Index: ui/touch_selection/touch_selection_controller.cc |
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc |
index ad010c3807275ac0aee8b74fe7b2dc227e8c4510..34cc30a526172079f53e9319952ca4127031b08d 100644 |
--- a/ui/touch_selection/touch_selection_controller.cc |
+++ b/ui/touch_selection/touch_selection_controller.cc |
@@ -491,8 +491,14 @@ void TouchSelectionController::DeactivateSelection() { |
} |
void TouchSelectionController::ForceNextUpdateIfInactive() { |
- if (active_status_ == INACTIVE) |
+ // Only force the update if the reported selection is non-empty but still |
+ // considered "inactive", i.e., it wasn't preceded by a user gesture or |
+ // the handles have since been explicitly hidden. |
+ if (active_status_ == INACTIVE && |
+ start_.type() != SelectionBound::EMPTY && |
+ end_.type() != SelectionBound::EMPTY) { |
force_next_update_ = true; |
+ } |
} |
gfx::Vector2dF TouchSelectionController::GetStartLineOffset() const { |