Bug 765372 - Add some null safety to isElementClickable. r=wesj

This commit is contained in:
Margaret Leibovic 2012-06-15 15:58:36 -07:00
parent d1a1b105de
commit 3cb082effd

View File

@ -3342,7 +3342,7 @@ const ElementTouchHelper = {
if (!aAllowBodyListeners && aElement && aElement.ownerDocument) if (!aAllowBodyListeners && aElement && aElement.ownerDocument)
stopNode = aElement.ownerDocument.body; stopNode = aElement.ownerDocument.body;
for (let elem = aElement; elem != stopNode; elem = elem.parentNode) { for (let elem = aElement; elem && elem != stopNode; elem = elem.parentNode) {
if (aUnclickableCache && aUnclickableCache.indexOf(elem) != -1) if (aUnclickableCache && aUnclickableCache.indexOf(elem) != -1)
continue; continue;
if (this._hasMouseListener(elem)) if (this._hasMouseListener(elem))