New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing middle mouse button clipboard paste on linux (atom:atom#8648) #14063

Merged
merged 2 commits into from Apr 4, 2017

Conversation

Projects
None yet
3 participants
@dietmar
Contributor

dietmar commented Mar 25, 2017

Description of the Change

The functionality of pasting the clipboard on middle mouse click on Linux has been moved from onMouseUp to onMouseDown. Now it is consistent with the general behavior on Linux. Also, there was some interplay of this functionality with dragging, which resulted in issue #8648. This is resolved now.

Alternate Designs

None

Why Should This Be In Core?

Addresses a bug in Core.

Benefits

Resolution of issue #8648 and consistency of UI behavior with other Linux applications.

Possible Drawbacks

None

Applicable Issues

#8648

@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Mar 25, 2017

Member

Can you please add some specs to cover this change? The current middle-mouse-paste specs are at

describe('middle mouse paste on Linux', function () {
.

Member

50Wliu commented Mar 25, 2017

Can you please add some specs to cover this change? The current middle-mouse-paste specs are at

describe('middle mouse paste on Linux', function () {
.

@dietmar

This comment has been minimized.

Show comment
Hide comment
@dietmar

dietmar Mar 25, 2017

Contributor

As far as I can tell (which I'm afraid really doesn't mean much, with regard to specs), those current specs are still correct: After something has been copied to the clipboard, a middle mouse button mousedown followed by a mouseup should result in the clipboard text being pasted. The fact that it is now really the mousedown rather than the mouseup that triggers the pasting doesn't matter IMO.

Contributor

dietmar commented Mar 25, 2017

As far as I can tell (which I'm afraid really doesn't mean much, with regard to specs), those current specs are still correct: After something has been copied to the clipboard, a middle mouse button mousedown followed by a mouseup should result in the clipboard text being pasted. The fact that it is now really the mousedown rather than the mouseup that triggers the pasting doesn't matter IMO.

@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Mar 25, 2017

Member

Since this fixes #8648, there should be at the very least one new spec to ensure that a double-paste no longer occurs that fails on master but passes on this branch.

Member

50Wliu commented Mar 25, 2017

Since this fixes #8648, there should be at the very least one new spec to ensure that a double-paste no longer occurs that fails on master but passes on this branch.

@dietmar

This comment has been minimized.

Show comment
Hide comment
@dietmar

dietmar Mar 26, 2017

Contributor

Done: I have added a spec identical to the existing one, but with an additional left click before the middle click. This is a way to reproduce #8648 as described in #8648 (comment). This one fails on master (because of double paste) but passes on this branch.

Contributor

dietmar commented Mar 26, 2017

Done: I have added a spec identical to the existing one, but with an additional left click before the middle click. This is a way to reproduce #8648 as described in #8648 (comment). This one fails on master (because of double paste) but passes on this branch.

@ungb ungb merged commit 8bc325b into atom:master Apr 4, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ungb

This comment has been minimized.

Show comment
Hide comment
@ungb

ungb Apr 4, 2017

Contributor

Was able to verify this change on ubuntu, Tested before and after and saw it fixed the issue when you don't move the mouse you get double paste.

Contributor

ungb commented Apr 4, 2017

Was able to verify this change on ubuntu, Tested before and after and saw it fixed the issue when you don't move the mouse you get double paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment