Fix Selection Popup flash before disappear

If the Selection Popup shows on the contenteditable, when user clicks outside
the contenteditable box, the selected text is cleared in onSelectionChanged(),
and onNodeAttributeUpdated() will be called, so ActionMode will invalidate and
update with the new menus before SELECTION_HANDLES_CLEARED happens. This causes
the Selection Popup to flash before disappear. The CL fixes it.

Bug: 924039
Change-Id: I85e35ecc9ab1f51e5117131eab05ff0ee97c1402
Reviewed-by: Bo <>
Reviewed-by: Changwan Ryu <>
Reviewed-by: Pedro Amaral <>
Commit-Queue: Pedro Amaral <>
Cr-Commit-Position: refs/heads/master@{#631873}
3 files changed