From c252b5c37a6bbb68bbbb050ee3fd33c6ef33b7a1 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 13 Jan 2000 23:56:34 +0000 Subject: [PATCH] small fix for bug23833 r= jfrancis git-svn-id: svn://10.0.0.236/trunk@57744 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsHTMLEditRules.cpp | 3 ++- mozilla/editor/libeditor/html/nsHTMLEditRules.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp index 9a4e8ec7438..abdd25847c8 100644 --- a/mozilla/editor/base/nsHTMLEditRules.cpp +++ b/mozilla/editor/base/nsHTMLEditRules.cpp @@ -1584,7 +1584,6 @@ nsHTMLEditRules::WillAlign(nsIDOMSelection *aSelection, *aCancel = PR_FALSE; *aHandled = PR_FALSE; - nsAutoSelectionReset selectionResetter(aSelection); PRBool outMakeEmpty; res = ShouldMakeEmptyBlock(aSelection, alignType, &outMakeEmpty); @@ -1611,6 +1610,8 @@ nsHTMLEditRules::WillAlign(nsIDOMSelection *aSelection, return res; } + nsAutoSelectionReset selectionResetter(aSelection); + // convert the selection ranges into "promoted" selection ranges: // this basically just expands the range to include the immediate // block parent, and then further expands to include any ancestors diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index 9a4e8ec7438..abdd25847c8 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -1584,7 +1584,6 @@ nsHTMLEditRules::WillAlign(nsIDOMSelection *aSelection, *aCancel = PR_FALSE; *aHandled = PR_FALSE; - nsAutoSelectionReset selectionResetter(aSelection); PRBool outMakeEmpty; res = ShouldMakeEmptyBlock(aSelection, alignType, &outMakeEmpty); @@ -1611,6 +1610,8 @@ nsHTMLEditRules::WillAlign(nsIDOMSelection *aSelection, return res; } + nsAutoSelectionReset selectionResetter(aSelection); + // convert the selection ranges into "promoted" selection ranges: // this basically just expands the range to include the immediate // block parent, and then further expands to include any ancestors