Closed fcollonval closed 6 months ago
Thanks @fcollonval.
The code looks good, but I did not manage to test it in Jupyterlab.
I understood this PR is primarily to fix the codemirror search VS jupyterlab search, according to https://github.com/jupyterlab/jupyterlab/pull/15459.
I tried to enable the codemirror search without success. I can also see that the codemirror search is enabled by default for inline editor. Does it mean that the codemirror search should replace the jupyterlab search in Notebook, for instance ?
Thanks for the review @brichet
It will not be easy to test on lab directly.
The main ground is that a keyboard shortcut event handled by codemirror can not be stopped, only marked as default prevented.
But in the generic sense, event that are default prevented should not be treated (except to do some stuff related to focused element changes).
Regarding the search, the search from code mirror has always be enabled in simple editor (easy way for us to provide a feature). But it must and it is deactivated in document (the cell editor required a special treatment as set in the lab pr).
Regarding the search, the search from code mirror has always be enabled in simple editor (easy way for us to provide a feature). But it must and it is deactivated in document (the cell editor required a special treatment as set in the lab pr).
Thanks, this is what I missed to test it.
This removes the processing of keydown event by the commands registry if it is prevented (aka already treated).