Skip to content

keyBindingFn not triggering on tab key press #68

@erikmartinjordan

Description

@erikmartinjordan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions