Slate: Shift+left and Shift+right hotkeys do not work in slate-react 0.19.4

Created on 24 Oct 2018  路  6Comments  路  Source: ianstormtaylor/slate

Bug

What's the current behavior?

Using Shift+Left and Shift+Right hotkeys stopped working in [email protected]
It works find in 0.19.3

It can be easily replicated on all the examples https://www.slatejs.org.

What's the expected behavior?

Shift+Left and Shift+Right hotkeys should extend selection backward or forward.

It seems that it was caused by https://github.com/ianstormtaylor/slate/pull/2169
cc author of that PR @ericedem

Most helpful comment

Ah sorry nevermind, I must have had old cold locally. Sorry about that 馃槄 .

All 6 comments

I concur regarding #2169. Before I finished reading your comment I remembered seeing a commit about arrow key movement, then came back to paste it and saw you beat me to the punch.

Confirmed that checking out the commit just prior restores proper selection behavior, but I can't for the life of me see anything wrong with the code or the tests. Very weird. Perhaps @ericedem will have more luck since he might have a better idea of where to look.

Oh nice catch guys, thanks! I'll take a look.

@dannsam @Slapbox Where can I find standard behavior on how this works for feature parity? I tried doing it on mac / windows and the sites I tried behave the same as slate in 0.42.

Was this a custom feature for slate? As best I can tell we are just defaulting to browser defaults here.

Ah sorry nevermind, I must have had old cold locally. Sorry about that 馃槄 .

Programatically I'm not sure how it's handled, but the behavior should be the same as in any text editor. It should just select the character to the left or right like this: http://recordit.co/t68e41QNED

It would be awesome to have a simple way to test previous versions, but right now the best thing I'm aware of is to clone the repo and checkout the earlier commit you want to try.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

varoot picture varoot  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

chrpeter picture chrpeter  路  3Comments

YurkaninRyan picture YurkaninRyan  路  3Comments

gorillatron picture gorillatron  路  3Comments