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

Commit 5642625c authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Update insertion handler for WebTextView.

Bug:3152629
Change-Id: If2a33eb5456493fb9b3b2c54fcc4f5348fe129e1
parent 70a2c15e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -334,6 +334,10 @@ import java.util.ArrayList;
        }
    }

    public void onDrawSubstitute() {
      updateCursorControllerPositions();
    }

    @Override
    public void onEditorAction(int actionCode) {
        switch (actionCode) {
+3 −0
Original line number Diff line number Diff line
@@ -3531,6 +3531,9 @@ public class WebView extends AbsoluteLayout
        if (AUTO_REDRAW_HACK && mAutoRedraw) {
            invalidate();
        }
        if (inEditingMode()) {
            mWebTextView.onDrawSubstitute();
        }
        mWebViewCore.signalRepaintDone();
    }

+9 −0
Original line number Diff line number Diff line
@@ -4162,6 +4162,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

        canvas.restore();

        updateCursorControllerPositions();
    }

    /**
     * Update the positions of the CursorControllers.  Needed by WebTextView,
     * which does not draw.
     * @hide
     */
    protected void updateCursorControllerPositions() {
        if (mInsertionPointCursorController != null &&
                mInsertionPointCursorController.isShowing()) {
            mInsertionPointCursorController.updatePosition();