Skip to content
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

Pointer capture when moving sashes or scrollbars #21675

Closed
mquandalle opened this issue Mar 2, 2017 · 5 comments
Closed

Pointer capture when moving sashes or scrollbars #21675

mquandalle opened this issue Mar 2, 2017 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Milestone

Comments

@mquandalle
Copy link
Contributor

mquandalle commented Mar 2, 2017

  • VSCode Version: 1.10
  • OS Version: Ubuntu 16.10

While dragging the sash, the mouse cursor changes when going over different UI elements:

pointer capture broken

In the above gif, I'm maintaining my mouse button pressed during the entire sash drag, but the cursor change from the vertical double arrow to the pointer and then insert variants. The expected behavior is that the cursor should be “captured” by the element being dragged and shouldn't change even if it hover different elements.

Since Electron/Chrome doesn't support the setCapture API which would be the canonical solution to this problem, we have to rely on workarounds using JavaScript events and CSS. I changed the implementation when implementing #4702 and at that time it was working—at least on my machine, but the implementation has changed since then. The following blog post describe an approach that seems more robust than what I had implemented: http://code.fitness/post/2016/06/capture-mouse-events.html.

@mquandalle
Copy link
Contributor Author

Note that this issue arises when dragging other elements as well, like the scrollbar or the minimap.

@mquandalle mquandalle changed the title Pointer capture when moving sashes Pointer capture when moving sashes or scrollbars Mar 2, 2017
@joaomoreno joaomoreno added this to the Backlog milestone Mar 2, 2017
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug ux User experience issues labels Mar 2, 2017
@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Mar 2, 2017
@bpasero bpasero added layout General VS Code workbench layout issues and removed help wanted Issues identified as good community contribution opportunities ux User experience issues workbench labels Nov 15, 2017
@bpasero bpasero assigned isidorn and unassigned joaomoreno and bpasero Nov 15, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 15, 2017
@isidorn isidorn added this to the Backlog milestone Nov 15, 2017
@mquandalle
Copy link
Contributor Author

This was caused by e0b601e.

@isidorn
Copy link
Contributor

isidorn commented Mar 19, 2018

fyi @bpasero seems to be your commit

@bpasero bpasero modified the milestones: Backlog, March 2018 Mar 19, 2018
@bpasero bpasero self-assigned this Mar 19, 2018
@bpasero
Copy link
Member

bpasero commented Mar 19, 2018

@isidorn we can return that ugly CSS rule (that seems to be the only way) conditionally, e.g. createStyleSheet only on mouse down and then remove it afterwards.

@isidorn
Copy link
Contributor

isidorn commented Mar 19, 2018

@bpasero I would prefer no action for now. It is a minor issue.

@jrieken jrieken added the verified Verification succeeded label Mar 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants