From b7c39e7aa06c1b6d5540940bc74436bd30d27969 Mon Sep 17 00:00:00 2001 From: Morris Tseng Date: Wed, 24 Dec 2014 00:02:00 +0100 Subject: [PATCH] Bug 1114853 - Part 5: Don't dispatch event when we're at drag mode. r=roc --- layout/base/SelectionCarets.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layout/base/SelectionCarets.cpp b/layout/base/SelectionCarets.cpp index 7f65dc711c09..28b71cdf5854 100644 --- a/layout/base/SelectionCarets.cpp +++ b/layout/base/SelectionCarets.cpp @@ -1251,8 +1251,12 @@ SelectionCarets::Reflow(DOMHighResTimeStamp aStart, DOMHighResTimeStamp aEnd) SELECTIONCARETS_LOG("Update selection carets after reflow!"); UpdateSelectionCarets(); - DispatchSelectionStateChangedEvent(GetSelection(), - SelectionState::Updateposition); + // We don't care selection state when we're at drag mode. We always hide + // bubble in drag mode. So, don't dispatch event here. + if (mDragMode == NONE) { + DispatchSelectionStateChangedEvent(GetSelection(), + SelectionState::Updateposition); + } } return NS_OK; }