diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 926b206f535..46c03e02c16 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -2280,7 +2280,6 @@ NS_IMETHODIMP nsEditor::ScrollSelectionIntoView(PRBool aScrollToAnchor) // If the editor is relying on asynchronous reflows, we have // to use asynchronous requests to scroll, so that the scrolling happens // after reflow requests are processed. - // XXXbz why not just always do async scroll? syncScroll = !(flags & nsIPlaintextEditor::eEditorUseAsyncUpdatesMask); } @@ -4217,11 +4216,6 @@ nsresult nsEditor::EndUpdateViewBatch() // the reflows we caused will get processed before the invalidates. if (flags & nsIPlaintextEditor::eEditorUseAsyncUpdatesMask) { updateFlag = NS_VMREFRESH_DEFERRED; - } else if (presShell) { - // Flush out layout. Need to do this because if we have no invalidates - // to flush the viewmanager code won't flush our reflow here, and we - // have selection code that does sync caret scrolling in this case. - presShell->FlushPendingNotifications(Flush_Layout); } mBatch.EndUpdateViewBatch(updateFlag); } diff --git a/editor/libeditor/base/tests/Makefile.in b/editor/libeditor/base/tests/Makefile.in index 9c5b9a0e7af..3589e792637 100644 --- a/editor/libeditor/base/tests/Makefile.in +++ b/editor/libeditor/base/tests/Makefile.in @@ -49,6 +49,8 @@ _TEST_FILES = \ test_selection_move_commands.xul \ test_bug514156.html \ test_bug567213.html \ + file_bug586662.html \ + test_bug586662.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/editor/libeditor/base/tests/file_bug586662.html b/editor/libeditor/base/tests/file_bug586662.html new file mode 100644 index 00000000000..2989531975a --- /dev/null +++ b/editor/libeditor/base/tests/file_bug586662.html @@ -0,0 +1,7 @@ + + +
+ + + + diff --git a/editor/libeditor/base/tests/test_bug586662.html b/editor/libeditor/base/tests/test_bug586662.html new file mode 100644 index 00000000000..2d6c7b0aebe --- /dev/null +++ b/editor/libeditor/base/tests/test_bug586662.html @@ -0,0 +1,53 @@ + + + + + ++ ++ +