1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00
slate/packages
Eric Edem b1073f5672 fix: extend forward / backward (#2314)
#### Is this adding or improving a _feature_ or fixing a _bug_?

_bug_

#### What's the new behavior?

Fix behavior for <kbd>shift + left</kbd> and <kbd>shift + right</kbd>. Now they will correctly move forward / backward.

#### How does this change work?

turns out that the hotkey `'left'` would also pick up with a modifier key `'shift+left'` so checking for `Hotkeys.isExtendForward()` needs to come before `Hotkeys.isMoveForward()` and it needs to short circuit with `return true`. Likewise for backward.

#### Have you checked that...?

<!-- 
Please run through this checklist for your pull request: 
-->

* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)

#### Does this fix any issues or need any specific reviewers?

Fixes: #2307 
Reviewers: @ianstormtaylor
2018-10-24 14:50:20 -07:00
..
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-08-01 12:07:02 -07:00
2018-08-16 15:26:05 -07:00
2018-08-01 12:07:02 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00