Draft-js: RichUtils.handleKeyCommand(editorState, 'backspace') doesn't work

Created on 29 Aug 2018  Â·  8Comments  Â·  Source: facebook/draft-js

This is a bug!

Put cursor into editor and press the button
https://jsfiddle.net/6afrsLp3/

Some character should be deleted, but I see error "Cannot read property 'getCurrentContent' of null"

0.10.5

Most helpful comment

It doesn't work for me too. RichUtils.handleKeyCommand(this.state.editorState, 'backspace') returns null

All 8 comments

@blaremc - I'm unable to repro this on the fiddle you provided or any of my own editor instances. Here's a video of me trying to repro on your fiddle:
https://www.dropbox.com/s/k0kebnw57mwrbwl/draftjs-backspace-no-repro.mov

Let me know if this is repro'ing consistently for you and/or I misunderstood something! This being broken would be a pretty major bug & as far as I can see nothing has changed recently in this behavior.

Closing due to no response. Please re-open if the issue persists.

It doesn't work for me too. RichUtils.handleKeyCommand(this.state.editorState, 'backspace') returns null

Same problem here. Any solutions?

Same problem for me too .. both RichUtils.handleKeyCommand(this.state.editorState, 'backspace') and CodeUtils.handleKeyCommand(editorState, 'backspace') returns undefined

Gonna reopen— if someone can provide a repro it'd be appreciated (:

Same problem here.

RichUtils.handleKeyCommand(editorState, 'backspace') returns undefined confirmed

Was this page helpful?
0 / 5 - 0 ratings