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

Commit 62459c0f authored by Leon Scroggins's avatar Leon Scroggins
Browse files

If the new text and old text are "", return from onTextChanged.

Fixes http://b/issue?id=2496329

Change-Id: I239f143c0e539710342e46783157344a4d7ccc08
parent a401d559
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -377,11 +377,17 @@ import java.util.ArrayList;
            return;
        }
        mPreChange = postChange;
        // This was simply a delete or a cut, so just delete the selection.
        if (before > 0 && 0 == count) {
        if (0 == count) {
            if (before > 0) {
                // This was simply a delete or a cut, so just delete the
                // selection.
                mWebView.deleteSelection(start, start + before);
                // For this and all changes to the text, update our cache
                updateCachedTextfield();
            }
            // before should never be negative, so whether it was a cut
            // (handled above), or before is 0, in which case nothing has
            // changed, we should return.
            return;
        }
        // Find the last character being replaced.  If it can be represented by