How do I prevent selection scrolling in the body
I have divs that are placed off-screen.
I have disabled scrollbars like so:
body {
overflow: hidden;
}
Currently, when I highlight text and drag the mouse outside the window, the body still scrolls.
How can I prevent this behaviour? (Setting offscreen elements 开发者_运维知识库to display: none is not an option.)
Thanks!
Travis
What browser is this happening in?
Where, off-screen, are the divs positioned? If they are off to the left or right, you could try using a negative top margin instead, as users are unlikely to highlight "up".
精彩评论