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.
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!
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!