Bug 839473 - Return early in form.js for non editable content r=fabrice

This commit is contained in:
Vivien Nicolas 2013-02-12 16:31:08 -08:00
parent 983957f583
commit f8a403ad0e

View File

@ -237,12 +237,20 @@ let FormAssistant = {
switch (evt.type) {
case "focus":
if (target && isContentEditable(target)) {
if (!target) {
break;
}
if (target instanceof HTMLDocument || target == content) {
break;
}
if (isContentEditable(target)) {
this.showKeyboard(this.getTopLevelEditable(target));
break;
}
if (target && this.isFocusableElement(target))
if (this.isFocusableElement(target))
this.showKeyboard(target);
break;