-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Key listener for Tab doesn't work #1967
Comments
This appears to work: editor.keyboard.bindings[9].unshift({ |
Yes. You can overwrite the default binding, problem is you can't do with |
@DmitrySkripkin When I use the example you pointed to it prevents the tab character from appearing in the quill editor or it prevents anything from happening at all, depending on whether I return true or not. Is there a way to get the default behavior, where the tab appears in the editor, but my code also runs? |
I dig a bit deeper. Default tab handler does not return anything. So even if you add a new binding it won't be executed anyway. This means you have to rewrite it - basically copy/paste it or use method with P.S. Quill is not perfect, I would like to have more flexible bindings with some kind of weights to sort them. |
The problem is |
Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏 |
Please describe the a concise description and fill out the details below. It will help others efficiently understand your request and get to an answer instead of repeated back and forth. Providing a minimal, complete and verifiable example will further increase your chances that someone can help.
Steps for Reproduction
Expected behavior:
That code doesn't print to the console. Changing 'Tab' to 9 or '9' doesn't work. It does work for other keys.
Actual behavior:
That code should print to the console.
Platforms:
Mac 10.13.3 (17D47) and Chrome Version 64.0.3282.167 (Official Build) (64-bit)
Version: 1.3.5
It appears as though a pre-existing handler runs first and prevents my handler from running. Is there a way to put my handler first?
The text was updated successfully, but these errors were encountered: