зеркало из 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,6 +577,17 @@ nsTextEditorTextListener::HandleText(nsIDOMEvent* aTextEvent)
|
|||
textRangeList->AddRef();
|
||||
nsCOMPtr<nsIEditorIMESupport> imeEditor = do_QueryInterface(mEditor, &result);
|
||||
if (imeEditor) {
|
||||
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче