-
Notifications
You must be signed in to change notification settings - Fork 128
Fix #2698, disable selection after a scroll event when the mouseup is… #2726
Conversation
i can still trigger the bug... looking into why |
On my mac with "magic" scrollbars I need to scroll a bit to get the bar to show up, but once I do I seem to be lingering over the scrollbar for more than a second before I mousedown which causes me to be over When I set scrollbars to be always on, I get the selection behavior in the "normal" case as well, i.e. the first scroll movement is after I mousedown on the scrollbar, which seems like it'd be more normal on Windows. This patch improves on the current result for some cases, but it seems like the (most?) common usage of this (IMHO outmoded) scrolling behavior still results in the undesired selector. I personally would rather WONTFIX because it seems really difficult to do conclusively but I'm ok with this minor improvement too. |
Increasing |
Rather than use a timeout, what if we just disable the next mouseup when a mousedown is detected to the right of the body element? |
I guess it'd be slightly more complex, since the following mouseup might not land inside the browser window:
|
Oh, I see now, my logic was all backwards. Because mousedown triggers the action, the scroll happens after it, not before. It was only working for me because I initiate a scroll to see the scrollbars. Pondering... After some thought, I think on Mac we should just make a dead zone on the right, and on Windows we should ignore anything that is outside of the viewport. |
2d28316
to
58fb588
Compare
Redone with no timer or scroll detection, just a dead zone. |
58fb588
to
6d0f2d7
Compare
I think this works really nicely. Let's land it 👍 |
… in the scroll area