Skip to content

Conversation

dschmidt
Copy link
Member

@dschmidt dschmidt commented Aug 8, 2023

Description

... and handle multiple registered actions for bound keys

Related Issue

Motivation and Context

With event.preventDefault() at the top of the handler all text input is blocked

cc @jacob-nv

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@dschmidt dschmidt requested a review from JammingBen August 8, 2023 16:42
@update-docs
Copy link

update-docs bot commented Aug 8, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@dschmidt
Copy link
Member Author

dschmidt commented Aug 8, 2023

We could further simplify this by using https://vueuse.org/core/useEventListener/

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, unit tests are still failing though. @jacob-nv That solves the issue we talked about yesterday regarding the blocked browser shortcuts 🙂

We could further simplify this by using https://vueuse.org/core/useEventListener/

That would be nice, I think there are a lot of other use-cases for this as well.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

57.6% 57.6% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@JammingBen JammingBen merged commit 65831b6 into master Aug 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the keyboard-actions-fix branch August 10, 2023 06:16
ownclouders pushed a commit that referenced this pull request Aug 11, 2023
…n found (#9559)

* keyboardActions: Use event.preventDefault only when an action has been found

... and handle multiple registered actions for bound keys

* Simplify code for event listener addition/removal

* Use useEventListener from @vueuse

* Fix lint

* Register keyboardActions globally to avoid focus issues

* Disable shortcut handling in certain contexts
AlexAndBear pushed a commit that referenced this pull request Aug 15, 2023
…n found (#9559)

* keyboardActions: Use event.preventDefault only when an action has been found

... and handle multiple registered actions for bound keys

* Simplify code for event listener addition/removal

* Use useEventListener from @vueuse

* Fix lint

* Register keyboardActions globally to avoid focus issues

* Disable shortcut handling in certain contexts
AlexAndBear pushed a commit that referenced this pull request Dec 13, 2023
…n found (#9559)

* keyboardActions: Use event.preventDefault only when an action has been found

... and handle multiple registered actions for bound keys

* Simplify code for event listener addition/removal

* Use useEventListener from @vueuse

* Fix lint

* Register keyboardActions globally to avoid focus issues

* Disable shortcut handling in certain contexts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make some keyboard actions global to improve UX Paste file keyboard action doesn't work (Cmd + V | Ctrl + V)
2 participants