Draft-js: Up & Down arrows events not handled by keyBindingFn, yet deprecated in docs

Created on 28 Mar 2018  路  4Comments  路  Source: facebook/draft-js

Do you want to request a feature or report a bug?

I want to report a bug :bug:

What is the current behavior?

On keyBindingFn, key down & up events are not handled. To reproduce open skratch.xyz, dismiss the modal and when the editor is focused press up, down, right & left keys. Then go to the terminal and check the logs. Only right & left event logs will show up.

The code can be found in this repo: gillchristian/skratch. And this are the keyBindingFn & handleKeyCommand handlers.

What is the expected behavior?

I would expect to get the event for the up and down keys.

This happens on development as well as with the production build (CRA).

  • draft-js v0.10.1

Tested on:

  • Chrome Version 66.0.3359.45 (Official Build) beta (64-bit)
  • Ubuntu 16.04

And:

  • Chrome Version 65.0.3325.181 (Official Build) (64-bit)
  • macOS High Sierra 10.13.3 (17D102)
documentation question

Most helpful comment

@gillchristian aren't those handlers deprecated?

I think this should be reopened until a non-deprecated way is available.

All 4 comments

This is awkward, there's onUpArrow & onDownArrow handlers specifically for this.

@gillchristian aren't those handlers deprecated?

I think this should be reopened until a non-deprecated way is available.

This is an issue. I'll ask the team whether we're expecting a release here soon or whether we should just revert the docs. 馃憤

Any status on this? Maybe an ETA? 馃槃

@juliankrispel

Alt Text

Was this page helpful?
0 / 5 - 0 ratings