diff --git a/core/misc/displace.js b/core/misc/displace.js index 3315f2ea5302d73144a7f65b2dc2f14d1bf188a3..3e89c563ecfd9c9aa8cd2725d028b44a8e71cf6a 100644 --- a/core/misc/displace.js +++ b/core/misc/displace.js @@ -165,7 +165,7 @@ var placement = $el.offset()[horizontal ? 'left' : 'top']; // Subtract scroll distance from placement to get the distance // to the edge of the viewport. - placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal) ? 'Left' : 'Top'] || 0; + placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0; // Find the displacement value according to the edge. switch (edge) { // Left and top elements displace as a sum of their own offset value