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

[NCRichContenteditable] Shortkeys not avoided #6403

Closed
janepie opened this issue Jan 20, 2025 · 3 comments
Closed

[NCRichContenteditable] Shortkeys not avoided #6403

janepie opened this issue Jan 20, 2025 · 3 comments

Comments

@janepie
Copy link

janepie commented Jan 20, 2025

When using the component NcRichEditable, keyboard shortkeys implemented via vue-shortkey (as for example in Calendar) do not get avoided, so for text typed in these fields keys like H or D do not work.

@janepie
Copy link
Author

janepie commented Jan 20, 2025

Causes nextcloud/assistant#16

@ShGKme
Copy link
Contributor

ShGKme commented Jan 20, 2025

NcRichContenteditable shouldn't block keyboard events. Any user of the component should be able to listen to these events.

If Assistant app handles keyboard events globally, including typing into contenteditable - the error is on the Assistant app side.

In case of using vue-shortkey - it should be configured to ignore contenteditable elements same as other input fields.

But vue-shortkey is not maintained, the latest release was 6 years ago, and it doesn't support Vue 3.

You can try to use our useHotKey composable to handle shortcuts: https://nextcloud-vue-components.netlify.app/#/Composables/useHotKey
It takes into account:

  • All input fields, including contenteditable
  • Accessibility settings

@ShGKme ShGKme closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@janepie
Copy link
Author

janepie commented Jan 21, 2025

Thank you for your input! I will test around a bit and talk to the Calendar people in which way we can deal with this

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 a pull request may close this issue.

2 participants