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

Use the modifier properties on mouse event instead of tracking keydown/keyup #58515

Open
alexdima opened this issue Sep 12, 2018 · 1 comment · May be fixed by #124406
Open

Use the modifier properties on mouse event instead of tracking keydown/keyup #58515

alexdima opened this issue Sep 12, 2018 · 1 comment · May be fixed by #124406
Assignees
Labels
debt Code quality issues editor-drag-and-drop Editor UI drag-and-drop operations help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@alexdima
Copy link
Member

Extracted from our conversation at e82498a

@rebornix rebornix added the debt Code quality issues label Sep 12, 2018
@rebornix rebornix added the editor-drag-and-drop Editor UI drag-and-drop operations label Oct 24, 2019
@rebornix rebornix added the help wanted Issues identified as good community contribution opportunities label Oct 12, 2020
@rebornix rebornix added this to the On Deck milestone Oct 12, 2020
@rebornix rebornix modified the milestones: On Deck, November 2020 Nov 4, 2020
@rebornix rebornix modified the milestones: January 2021, Backlog Jan 28, 2021
@mikemklee
Copy link
Contributor

Hello, I wanted to see if there is anything I could help out with this issue as it was labeled as help wanted, despite it being a little dated at this point.

I followed the link to the commit mentioned above to for some more info.

In the file changed in that commit, I noticed that a number of event handlers seem redundant, specifically:

  • onEditorKeyDown
  • onEditorKeyUp
  • _onEditorMouseDown
  • _onEditorMouseUp

Another method named _onEditorMouseDrag seem to be already doing all the work to track modifier key press and update mouse cursor appropriately depending on context.

If the above methods are removed, then I think the following variables can also be removed:

  • _mouseDown
  • _modifierPressed

I think this issue can be resolved by removing those methods and variables.
Would you be able to confirm that my observations are correct?

nrayburn-tech pushed a commit to nrayburn-tech/vscode that referenced this issue May 22, 2021
use event modifiers instead, mostly done already just removing some excess code
@nrayburn-tech nrayburn-tech linked a pull request May 22, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality issues editor-drag-and-drop Editor UI drag-and-drop operations help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants