Bug 701947 - VKB does not appear when tapping into an iframe text box. r=mfinkle

This commit is contained in:
Alex Pakhotin 2011-11-21 20:15:05 -08:00
parent bfc25d5ab2
commit 7c88da1486

View File

@ -1618,8 +1618,22 @@ var BrowserEventHandler = {
_elementReceivesInput: function(aElement) {
return aElement instanceof Element &&
(kElementsReceivingInput.hasOwnProperty(aElement.tagName.toLowerCase()) ||
aElement.contentEditable === "true" || aElement.contentEditable === "");
kElementsReceivingInput.hasOwnProperty(aElement.tagName.toLowerCase()) ||
this._isEditable(aElement);
},
_isEditable: function(aElement) {
let canEdit = false;
if (aElement.isContentEditable || aElement.designMode == "on") {
canEdit = true;
} else if (aElement instanceof HTMLIFrameElement && (aElement.contentDocument.body.isContentEditable || aElement.contentDocument.designMode == "on")) {
canEdit = true;
} else {
canEdit = aElement.ownerDocument && aElement.ownerDocument.designMode == "on";
}
return canEdit;
},
_scrollElementBy: function(elem, x, y) {