From e651048da1dc7dfcee4e0921b03e25cc92045f99 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Fri, 26 Oct 2001 21:21:04 +0000 Subject: [PATCH] fix for #106269. reply wasn't quoting the message body. r/sr=kin git-svn-id: svn://10.0.0.236/trunk@106402 18797224-902f-48f8-a5cc-f745e15eee43 --- .../editor/libeditor/html/nsHTMLDataTransfer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp b/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp index 3087da0f0f7..ebb19475cdf 100644 --- a/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -197,10 +197,17 @@ NS_IMETHODIMP nsHTMLEditor::LoadHTMLWithCharset(const nsAReadableString & aInput res = GetSelection(getter_AddRefs(selection)); if (NS_FAILED(res)) return res; - // Delete Selection - res = DeleteSelection(eNone); + PRBool isCollapsed; + res = selection->GetIsCollapsed(&isCollapsed); if (NS_FAILED(res)) return res; - + + // Delete Selection, but only if it isn't collapsed, see bug #106269 + if (!isCollapsed) + { + res = DeleteSelection(eNone); + if (NS_FAILED(res)) return res; + } + // Get the first range in the selection, for context: nsCOMPtr range, clone; res = selection->GetRangeAt(0, getter_AddRefs(range));