Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a403cb7e authored by Luca Zanolin's avatar Luca Zanolin
Browse files

The x and y position of the pop-up where not calculated correctly when the...

The x and y position of the pop-up where not calculated correctly when the text view had internal scrolling.

This method is invoked only when the pop-up is currently displayed and the text scrolles.

This is scenario is reproducible only with Voice IME (I think), as the text is inserted without
touching the screen.

Bug: 5290463

Change-Id: I0b842732cc1f115de06e992fbe28cb64eac49b22
parent 9f48d634
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9433,8 +9433,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                return false;
            }

            int posX = mPositionX + positionX;
            int posY = mPositionY + positionY;
            int posX = mPositionX + positionX - getScrollX();
            int posY = mPositionY + positionY - getScrollY();

            // Offset by 1 to take into account 0.5 and int rounding around getPrimaryHorizontal.
            return posX >= clip.left - 1 && posX <= clip.right + 1 &&