Hide insertion handles when deleting text

Insertion text handles should be hidden when the underlying text changes. As
such, add a hook to notify the AdapterInputConnection embedder of an IME event 
when text is deleted, in turn hiding the insertion handle.

BUG=389444

Review URL: https://codereview.chromium.org/351403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281686 0039d316-1c4b-4281-b951-d872f2087c98
parent e395858c
......@@ -406,6 +406,7 @@ public class ImeAdapter {
* @return Whether the native counterpart of ImeAdapter received the call.
*/
boolean deleteSurroundingText(int beforeLength, int afterLength) {
mViewEmbedder.onImeEvent(false);
if (mNativeImeAdapterAndroid == 0) return false;
// Can't send the deletion key code yet because it will delete an extra char at the end.
// Also the deleteSurroundingText message is not always ordered properly with key event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment