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

keyBindingFn not triggering on tab key press #68

Open
erikmartinjordan opened this issue Oct 23, 2020 · 0 comments
Open

keyBindingFn not triggering on tab key press #68

erikmartinjordan opened this issue Oct 23, 2020 · 0 comments

Comments

@erikmartinjordan
Copy link

Inlcuding the draft-js-markdown-shortcuts-plugin is blocking key binding for the tab key.

Example:

const keyDown = (e) => {
    
    if(e.key === 'Tab'){
        
        console.log('I never get here...');
        
    }

    console.log('Other keys are working fine.');
    
}

<Editor
    editorState  = {editorState}
    onChange     = {setEditorState}
    keyBindingFn = {keyDown}
    plugins      = {plugins}
/>

If I remove the plugin, everything works as exepected and I'm able to catch tab key presses. I've tried adding onTabmethod to the Editor and works fine, but I get a warning since the method is deprecated.

It's possible to catch tab presses using KeyBindingFn?

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

No branches or pull requests

1 participant