Bug 941367 - Fix JavaScript assertions in dom/inputmethod/forms.js caused by trying to get the selection of non-text controls. r=fabrice

--HG--
extra : rebase_source : eb9b497bb81e165bac9c128b888e2ddbfcb1b02f
This commit is contained in:
Jonathan Watt 2013-11-21 12:54:48 +00:00
parent f7eb2192f7
commit 0d53fff241

View File

@ -762,8 +762,9 @@ function isPlainTextField(element) {
return false;
}
return element instanceof HTMLInputElement ||
element instanceof HTMLTextAreaElement;
return element instanceof HTMLTextAreaElement ||
(element instanceof HTMLInputElement &&
element.mozIsTextField(false));
}
function getJSON(element, focusCounter) {