зеркало из https://github.com/mozilla/pjs.git
54449: Re-adding workaround for bug in delete-to-end, which was accidentally overwritten in XIF landing. r=jfrancis, sr=kin
This commit is contained in:
Родитель
a172a759bf
Коммит
e4c8c0286a
|
@ -2340,7 +2340,11 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
|
|||
break;
|
||||
case eToEndOfLine:
|
||||
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
||||
aAction = eNext;
|
||||
// Bugs 54449/54452: the selection jumps to the wrong place
|
||||
// when deleting past a <br> and action is eNext or ePrev,
|
||||
// so setting action to eNone makes delete-to-end marginally usable.
|
||||
// aAction should really be set to eNext
|
||||
aAction = eNone;
|
||||
break;
|
||||
default: // avoid several compiler warnings
|
||||
result = NS_OK;
|
||||
|
@ -2477,7 +2481,7 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsString& aInputStr
|
|||
// Bad things happen if you insert returns (instead of dom newlines, \n)
|
||||
// into an editor document.
|
||||
nsAutoString inputString (aInputString); // hope this does copy-on-write
|
||||
|
||||
|
||||
// Windows linebreaks: Map CRLF to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
|
|
|
@ -2340,7 +2340,11 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
|
|||
break;
|
||||
case eToEndOfLine:
|
||||
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
||||
aAction = eNext;
|
||||
// Bugs 54449/54452: the selection jumps to the wrong place
|
||||
// when deleting past a <br> and action is eNext or ePrev,
|
||||
// so setting action to eNone makes delete-to-end marginally usable.
|
||||
// aAction should really be set to eNext
|
||||
aAction = eNone;
|
||||
break;
|
||||
default: // avoid several compiler warnings
|
||||
result = NS_OK;
|
||||
|
@ -2477,7 +2481,7 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsString& aInputStr
|
|||
// Bad things happen if you insert returns (instead of dom newlines, \n)
|
||||
// into an editor document.
|
||||
nsAutoString inputString (aInputString); // hope this does copy-on-write
|
||||
|
||||
|
||||
// Windows linebreaks: Map CRLF to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче