Make sure we don't bubble up past the body element.

This commit is contained in:
Davide P. Cervone 2013-04-29 14:10:15 -04:00
parent 81eaac00e8
commit faa6de0a81

View File

@ -229,8 +229,8 @@
overlay = document.getElementById("MathJax_ZoomOverlay"); overlay = document.getElementById("MathJax_ZoomOverlay");
var xy = ZOOM.getXY(div); var xy = ZOOM.getXY(div);
var obj = div.parentNode, overflow = ZOOM.getOverflow(obj); var obj = div.parentNode, overflow = ZOOM.getOverflow(obj);
while (obj.parentNode && overflow === "visible") { while (obj.parentNode && obj !== document.body && overflow === "visible") {
obj = obj.parentNode; obj = obj.parentNode
overflow = ZOOM.getOverflow(obj); overflow = ZOOM.getOverflow(obj);
} }
if (overflow !== "visible") { if (overflow !== "visible") {