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 a138af8433
commit 2466684292

View File

@ -3342,7 +3342,7 @@ const ElementTouchHelper = {
if (!aAllowBodyListeners && aElement && aElement.ownerDocument)
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)
continue;
if (this._hasMouseListener(elem))