Bug 640120 - After clearing text using 'X' button in the textbox, typing stop working [r=mfinkle,a=approval2.0+]

This commit is contained in:
Vivien Nicolas 2011-03-10 17:02:19 +01:00
Родитель a854796f87
Коммит e3c02dcd92
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -1701,11 +1701,16 @@
<handler event="click" phase="bubbling"><![CDATA[
// bug 629661. To reset the autosuggestions mechanism of Android, the
// textfield need to reset the the IME
// textfield need to reset the IME state
if (event.originalTarget == this._searchClear) {
setTimeout(function(self) {
self.inputField.readOnly = true;
self.inputField.readOnly = false;
try {
let imeEditor = self.inputField.QueryInterface(Ci.nsIDOMNSEditableElement)
.editor
.QueryInterface(Ci.nsIEditorIMESupport);
if (imeEditor.composing)
imeEditor.forceCompositionEnd();
} catch(e) { alert(e); }
}, 0, this);
}
]]></handler>