Bug 756433 - Treat labels without an associated form element as unclickable. r=wesj

This commit is contained in:
Kartikaya Gupta 2012-07-16 12:11:19 -04:00
parent a9011adbd5
commit 83942ac597

View File

@ -3748,7 +3748,7 @@ const ElementTouchHelper = {
},
isElementClickable: function isElementClickable(aElement, aUnclickableCache, aAllowBodyListeners) {
const selector = "a,:link,:visited,[role=button],button,input,select,textarea,label";
const selector = "a,:link,:visited,[role=button],button,input,select,textarea";
let stopNode = null;
if (!aAllowBodyListeners && aElement && aElement.ownerDocument)
@ -3761,6 +3761,8 @@ const ElementTouchHelper = {
return true;
if (elem.mozMatchesSelector && elem.mozMatchesSelector(selector))
return true;
if (elem instanceof HTMLLabelElement && elem.control != null)
return true;
if (aUnclickableCache)
aUnclickableCache.push(elem);
}