Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stop dragging only when user interacts with keyboard #15916
Previously, we prevented users from dragging the selection further when the buffer was about to change. This was problematic because any change in the buffer, even one that was performed "automatically" by a package, would cancel the dragging action and result in a confusing experience for the user. On the other hand, we want to prevent users from accidentally selecting text when they perform an edit (see #15217, #15405).
This pull-request addresses both concerns by canceling the dragging as soon as the user interacts with the keyboard, instead of canceling the dragging when the buffer is about to change. One downside of this approach is that it changes the behavior of pressing a key that does not result in a buffer change, e.g. Shift, Right-Arrow, etc. In fact, pressing one of those keys will now prevent users from dragging the selection further. This seems like an acceptable tradeoff, but we are open to revisiting it in case it introduces pain in some other area of the system.
referenced this pull request
Oct 17, 2017
The current implementation also fixes atom/find-and-replace#520 which is a bad experience for touchpad users.
I think that this makes sense and now the interruption is entirely in the users control. Instead of being interrupted by automatic changes that can be outside of their control. I vote that we ship this and revisit if we get issues for it.
Thanks for the review. Yeah, unfortunately I think using
Nice! Thanks for testing this.