Slate: Delete key behaves more like backspace when selected block is empty

Created on 7 Dec 2017  Â·  7Comments  Â·  Source: ianstormtaylor/slate

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

Bug

What's the current behavior?

When the selection is on an empty block, the delete key behavior is more like backspace.

This causes an odd behavior where the cursor moves to the previous sibling when delete key is pressed instead of staying at the same block. Additionally, delete does not promote the content next sibling block to the current selected block as expected.

http://recordit.co/cBMAOQVAr8

What's the expected behavior?

Expected behavior is that delete key always maintains current block selection.

bug ♥ help

Most helpful comment

Fixed, I believe.

All 7 comments

This can be reproduced on any of the live examples: http://slatejs.org/#/rich-text

I am not being able to replicate this on a empty block even on the demo, weird

Reproduces in Firefox, Chrome, and Edge.

Interesting, opening the demo on Chrome 62 on OS X, I am not being able to reproduce it

Edit: http://recordit.co/1U6CkmvxVD

http://osxdaily.com/2013/04/26/delete-key-mac-forward-del/

The delete key on a Mac keyboard functions like a backspace key on a Windows/PC keyboard, deleting a character a time backwards from where the cursor is located.

On windows, the delete is a forward delete, so this is doing the wrong thing.

Aha, I see. Sneaky OS X...

Fixed, I believe.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianstormtaylor picture ianstormtaylor  Â·  3Comments

bunterWolf picture bunterWolf  Â·  3Comments

adrianclay picture adrianclay  Â·  3Comments

chrpeter picture chrpeter  Â·  3Comments

vdms picture vdms  Â·  3Comments