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

fix: tab shortcut always returns true in listitem #5145

Closed
wants to merge 1 commit into from

Conversation

halil-pan
Copy link

@halil-pan halil-pan commented May 14, 2024

Changes Overview

When I click tab on listItem or taskItem, the default sinkListItem command is executed and the result is returned. When sinkListItem returns false, the browser default behavior is automatically triggered, such as focusing on input on the page.

Implementation Approach

In the shortcut key handling function of listItem, always returns true for tab-related events, preventing subsequent behavior of the event

Verification Steps

  1. Open preview page: local or online
  2. Select the first line of any list
  3. Click tab, before, the page will automatically jump to the taskItem position, after this change, nothing will happen.

Checklist

  • I have renamed my PR according to the naming conventions. (e.g. feat: Implement new feature or chore(deps): Update dependencies)
  • My changes do not break the library.
  • I have added tests where applicable.
  • I have followed the project guidelines.
  • I have fixed any lint issues.

Copy link

netlify bot commented May 14, 2024

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit b24a199
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/6642d28c5b545d00085e043d
😎 Deploy Preview https://deploy-preview-5145--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nperez0111
Copy link
Contributor

We appreciate your contribution.

Unfortunately, this would break browser default behavior that may be depended on in other editor implementations.

And, it not returning true is by design so that other events may be triggered by the same keystroke.

So for that reason, I'm closing this PR. If your editor needs this behavior we encourage you to extend the extension & add that behavior yourself

@nperez0111 nperez0111 closed this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants