ender-overlay icon indicating copy to clipboard operation
ender-overlay copied to clipboard

Overlay mask and horizontal scrollbar

Open kaittodesk opened this issue 11 years ago • 0 comments

With a visible vertical scrollbar, when overlay (with a mask) is opened, the size of the mask will force browser to show horizontal scrollbar.

You can reproduce this on the demo page of your site - http://nemeseri.com/ender-overlay/demos/basics.html Make sure you have only vertical scrollbar visible. Now, if you click on any of the images, horizontal scrollbar will appear along with the overlay.

This comes from getDocSize function's Ender specific implementation. It uses bonzo's $.doc() method which returns viewport size (includes scrollbars' width/height), instead of the document body size.

I suggest to ditch the Ender specific if clause - if (window.ender) { - and use the default/fallback functionality that returns document width and height.

kaittodesk avatar Nov 06 '14 16:11 kaittodesk