diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index d7158cb4ab0..ce9fac1234a 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -4253,6 +4253,13 @@ nsTypedSelection::Clear(nsPresContext* aPresContext) } // Reset direction so for more dependable table selection range handling SetDirection(eDirNext); + + // If this was an ATTENTION selection, change it back to normal now + if (mFrameSelection->GetDisplaySelection() == + nsISelectionController::SELECTION_ATTENTION) { + mFrameSelection->SetDisplaySelection(nsISelectionController::SELECTION_ON); + } + return NS_OK; } @@ -5151,12 +5158,6 @@ nsTypedSelection::RemoveAllRanges() // Turn off signal for table selection mFrameSelection->ClearTableCellSelection(); - // If this was an ATTENTION selection, change it back to normal now - if (mFrameSelection->GetDisplaySelection() == - nsISelectionController::SELECTION_ATTENTION) { - mFrameSelection->SetDisplaySelection(nsISelectionController::SELECTION_ON); - } - return mFrameSelection->NotifySelectionListeners(GetType()); // Also need to notify the frames! // PresShell::CharacterDataChanged should do that on DocumentChanged