Closed wilzbach closed 8 years ago
Thanks for implementation :-) Well, please make more clear comment and variable name while the situation is a bit complicated.
Case 1
i
on a cell to get into 'normal mode (edit mode)'i
on a cell to get into 'insert mode'Case 2
i
on a cell to get into 'normal mode (edit mode)'i
on a cell to get into 'insert mode'wasInInsertBeforeBlur
should be wasInInsertBeforeWindowBlur
or whatever and the comment // except we were in insert mode before the last blur
is not really correct.
@greenify I perform some refactoring so please update to the latest
Hey,
yep yet another PR from me ;-)
I have noticed that Jupyter automatically unfocuses the current cell on a window.blur event (e.g. shifting the focus to a different tab) and they also issue a focus call once the window gains the focus again. This means that we will leave and the enter the edit mode and thus we will exit the insertMode in
handle_edit_mode
.Here I propose a simple fix to stay in the insertMode if we blurred the window before.