Don't drag draggables on scroll events#29842
Conversation
|
A scroll event comes in looking just like a button press (but with a higher number). It does not seem unreasonable to allow these to trigger pick events in general but to disable them for draggable things specifically. |
|
I don't think I understand this: "Pick" is logically selecting an element by clicking on it. No matter the technical implementation, why should scrolling ever be interpreted as pick? In what use case would that make sense? |
|
|
timhoffm
left a comment
There was a problem hiding this comment.
Anybody can merge after adding the suggested documentation.
|
|
||
| @staticmethod | ||
| def _picker(artist, mouseevent): | ||
| return (artist.contains(mouseevent) and mouseevent.name != "scroll_event"), {} |
There was a problem hiding this comment.
👍 to adding a comment - I thought this was a bit verbose for a private helper function, so I added a one-liner instead - what do you think?

PR summary
Fixes #29142; replaces #29270. The solution here is to set a custom picker on
DraggableBasethat doesn't fire if the event is a scroll event.PR checklist