Slate: first backspace after gaining window focus does not behave as expected.

Created on 5 Mar 2017  路  3Comments  路  Source: ianstormtaylor/slate

Expected: a character to be deleted on pressing backspace after focusing back to window with the editor.

Unexpected: First backspace after gaining window focus seems to be ignored for some reason. Backspaces after the first works as expected.

Reproduce:
1) Type something in the editor.
2) Focus on any other window.
3) Focus back on slate editor window.
4) Hit backspace key (last character left of caret does not get deleted).

I'm on MacOS. Tested on Google Chrome and Chromium.

Tried it in a couple of the Slate Example pages as well.

bug

Most helpful comment

I love this framework way too much to sit idle waiting, so I dipped my toe 馃槃 .

I basically searched for, copied, and appropriated onBlur to add onFocus and it worked!

I am not sure what consequences this addition will have on other parts. Perhaps there is a reason why onFocus was not there already, so holding off on a pull request.

Thanks much!!! for the awesomest editor framework!

All 3 comments

looks like "Editor" is missing "onFocus" handler. I would submit a patch, but I'm a noob and am not yet familiar with the development workflow and do not have one setup.

I love this framework way too much to sit idle waiting, so I dipped my toe 馃槃 .

I basically searched for, copied, and appropriated onBlur to add onFocus and it worked!

I am not sure what consequences this addition will have on other parts. Perhaps there is a reason why onFocus was not there already, so holding off on a pull request.

Thanks much!!! for the awesomest editor framework!

I could need onFocus too ;)
@ianstormtaylor what do you say? Is there a reason why onFocus was not there already?
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShardulNalegave picture ShardulNalegave  路  3Comments

JSH3R0 picture JSH3R0  路  3Comments

AlexeiAndreev picture AlexeiAndreev  路  3Comments

markolofsen picture markolofsen  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments