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-on: https://chromium-review.googlesource.com/c/1426252
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Pedro Amaral <amaralp@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631873}
3 files changed