fix for 27699: ime text insert screwed up for single line edit fields

This commit is contained in:
jfrancis%netscape.com 2000-02-16 00:53:31 +00:00
Родитель 3eeb81ac3d
Коммит 88c0d8e924
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -566,7 +566,11 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
// fixes bug 21032
// *** there's some debate about whether we should replace CRLF with spaces, or
// truncate the string at the first CRLF. Here, we replace with spaces.
if (nsIHTMLEditor::eEditorSingleLineMask & mFlags) {
// Hack: I stripped out this test for IME inserts - it screws up double byte chars
// that happen to end in the same values as CR or LF. Bug 27699
if (aInString->IsEmpty() && (aAction != kInsertTextIME))
if ((nsIHTMLEditor::eEditorSingleLineMask & mFlags) && (aAction != kInsertTextIME))
{
aOutString->ReplaceChar(CRLF, ' ');
}

Просмотреть файл

@ -566,7 +566,11 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
// fixes bug 21032
// *** there's some debate about whether we should replace CRLF with spaces, or
// truncate the string at the first CRLF. Here, we replace with spaces.
if (nsIHTMLEditor::eEditorSingleLineMask & mFlags) {
// Hack: I stripped out this test for IME inserts - it screws up double byte chars
// that happen to end in the same values as CR or LF. Bug 27699
if (aInString->IsEmpty() && (aAction != kInsertTextIME))
if ((nsIHTMLEditor::eEditorSingleLineMask & mFlags) && (aAction != kInsertTextIME))
{
aOutString->ReplaceChar(CRLF, ' ');
}