3 ms·
The problem I still have with the modals is the scrolling behavior. Aside from taking over the scroll event, which I do Not want to do, it seems if I want a mod
by Cshelton 11y ago
The problem I still have with the modals is the scrolling behavior. Aside from taking over the scroll event, which I do Not want to do, it seems if I want a modal to scroll without the background scrolling, the only way is to put a 'overflow: hidden' on the body tag. Anybody have a more clever way of doing this?
- spicyj 11y agoWhat's wrong with that CSS?
- evan_ 11y agoFor one thing it hides the scrollbar which in some browsers causes the whole page to shift by a number of pixels. It's not the worst thing but it's a little bit distracting. My QA people recently sent me a bug that was basically this issue.
- moretti 11y agoExactly, and you can't simply set a left margin because the scrollbar width is different in every OS. This is what bootstrap does: https://github.com/twbs/bootstrap/blob/83bfff7f0765503b990b96c303eef67009e48d77/js/modal.js#L277 https://github.com/twbs/bootstrap/blob/83bfff7f0765503b990b9...
- deleted 11y ago[deleted]