diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index ab7c7c18823d..8df235880400 100644 --- a/layout/base/nsCaret.cpp +++ b/layout/base/nsCaret.cpp @@ -551,7 +551,7 @@ NS_IMETHODIMP nsCaret::NotifySelectionChanged(nsIDOMDocument *, nsISelection *aDomSel, int16_t aReason) { - if (aReason & nsISelectionListener::MOUSEUP_REASON)//this wont do + if ((aReason & nsISelectionListener::MOUSEUP_REASON) || !IsVisible())//this wont do return NS_OK; nsCOMPtr domSel(do_QueryReferent(mDomSelectionWeak));