зеркало из https://github.com/mozilla/pjs.git
Bug 109265
checking in for skamio@netscape.net Disabling IME for Readonly attribute of <INPUT> /r=yokoyama; /sr=kin
This commit is contained in:
Родитель
c62cc6b0a8
Коммит
928b9dbbe2
|
@ -577,8 +577,19 @@ nsTextEditorTextListener::HandleText(nsIDOMEvent* aTextEvent)
|
|||
textRangeList->AddRef();
|
||||
nsCOMPtr<nsIEditorIMESupport> imeEditor = do_QueryInterface(mEditor, &result);
|
||||
if (imeEditor) {
|
||||
result = imeEditor->SetCompositionString(composedText,textRangeList,textEventReply);
|
||||
ScrollSelectionIntoView(mEditor);
|
||||
PRUint32 flags;
|
||||
// if we are readonly or disabled, then do nothing.
|
||||
if (NS_SUCCEEDED(mEditor->GetFlags(&flags))) {
|
||||
if (flags & nsIPlaintextEditor::eEditorReadonlyMask ||
|
||||
flags & nsIPlaintextEditor::eEditorDisabledMask) {
|
||||
#if DEBUG_IME
|
||||
printf("nsTextEditorTextListener::HandleText, Readonly or Disabled\n");
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
result = imeEditor->SetCompositionString(composedText,textRangeList,textEventReply);
|
||||
ScrollSelectionIntoView(mEditor);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче