From 51d5e97637ed11042ac3ef2df8ee20eaade8b833 Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Sat, 3 Jul 1999 17:07:08 +0000 Subject: [PATCH] Fixed SetCaretAfterElement (but cursor still not redrawn correctly) git-svn-id: svn://10.0.0.236/trunk@38280 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsHTMLEditor.cpp | 4 ++-- mozilla/editor/libeditor/html/nsHTMLEditor.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/editor/base/nsHTMLEditor.cpp b/mozilla/editor/base/nsHTMLEditor.cpp index ef00bc68eba..2e1f7e89480 100644 --- a/mozilla/editor/base/nsHTMLEditor.cpp +++ b/mozilla/editor/base/nsHTMLEditor.cpp @@ -2206,7 +2206,7 @@ nsHTMLEditor::InsertElement(nsIDOMElement* aElement, PRBool aDeleteSelection) nsCOMPtr newNode = do_QueryInterface(aElement); PRBool isInline; res = IsNodeInline(newNode, isInline); - if( NS_SUCCEEDED(res) && isInline) + if( NS_SUCCEEDED(res) /*&& isInline*/) { // The simple case of an inline node res = InsertNode(aElement, parentSelectedNode, offsetOfNewNode); @@ -2414,7 +2414,7 @@ nsHTMLEditor::SetCaretAfterElement(nsIDOMElement* aElement) if (NS_SUCCEEDED(res)) { // Collapse selection to just after desired element, - selection->Collapse(parent, offsetInParent+1); + selection->Collapse(parent, offsetInParent); } } } diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index ef00bc68eba..2e1f7e89480 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -2206,7 +2206,7 @@ nsHTMLEditor::InsertElement(nsIDOMElement* aElement, PRBool aDeleteSelection) nsCOMPtr newNode = do_QueryInterface(aElement); PRBool isInline; res = IsNodeInline(newNode, isInline); - if( NS_SUCCEEDED(res) && isInline) + if( NS_SUCCEEDED(res) /*&& isInline*/) { // The simple case of an inline node res = InsertNode(aElement, parentSelectedNode, offsetOfNewNode); @@ -2414,7 +2414,7 @@ nsHTMLEditor::SetCaretAfterElement(nsIDOMElement* aElement) if (NS_SUCCEEDED(res)) { // Collapse selection to just after desired element, - selection->Collapse(parent, offsetInParent+1); + selection->Collapse(parent, offsetInParent); } } }