Bug 337871 r+sr=roc Screen jumps around with multiple textboxes and spellchecking

This commit is contained in:
brettw@gmail.com
2006-05-30 21:59:56 +00:00
parent f43cd27f95
commit 63db171aac

View File

@@ -5160,8 +5160,13 @@ nsTypedSelection::RemoveRange(nsIDOMRange* aRange)
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
selectFrames(presContext, aRange, PR_FALSE);
if (aRange == mAnchorFocusRange.get())
selectFrames(presContext, aRange, PR_FALSE);
// When the selection is user-created it makes sense to scroll the range
// into view. The spell-check selection, however, is created and destroyed
// in the background. We don't want to scroll in this case or the view
// might appear to be moving randomly (bug 337871).
if (mType != nsISelectionController::SELECTION_SPELLCHECK &&
aRange == mAnchorFocusRange.get())
{
PRInt32 cnt = mRangeArray.Count();
if (cnt > 0)