I contribute to a text editor app and have observed the following behavior: When I add or remove a MetricAffectingSpan (have tested with LineHeightSpan and TextAppearanceSpan), the edit text jumps to the current cursor location.
The jump appears to be triggered by a call to bringPointIntoView() in onPreDraw(). Adding CharacterStyle spans such as ForegroundColorSpan or BackgroundColorSpan does not cause this behavior.
This behavior is undesirable. I would like to prevent the addition of spans from causing the scroll position to jump. An explanation of what is going on and possible ways to work around it would be very helpful.
My current solution is to just block the call to
bringPointIntoViewfromonPreDrawIt's not pretty and probably not the best way to go about this. However, it seems to produce the desired behavior for me at this time