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

Commit 93553d7f authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Do not attempt to start action mode if there is no parent.

Bug:3514747
Change-Id: Id4c5c803bfb8bb2f5f81fa15599784e808e0d223
parent 6478e4f0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3016,7 +3016,8 @@ public class WebView extends AbsoluteLayout
    }

    /**
     * Start an ActionMode for finding text in this WebView.
     * Start an ActionMode for finding text in this WebView.  Only works if this
     *              WebView is attached to the view system.
     * @param text If non-null, will be the initial text to search for.
     *             Otherwise, the last String searched for in this WebView will
     *             be used to start.
@@ -3026,7 +3027,7 @@ public class WebView extends AbsoluteLayout
     */
    public boolean showFindDialog(String text, boolean showIme) {
        FindActionModeCallback callback = new FindActionModeCallback(mContext);
        if (startActionMode(callback) == null) {
        if (getParent() == null || startActionMode(callback) == null) {
            // Could not start the action mode, so end Find on page
            return false;
        }