diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-12-22 21:13:37 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-12-22 21:13:37 +0100 |
commit | 30e8892135dbd2fd6897d34fbfda7279101911c5 (patch) | |
tree | 842f28dc3701bcf49e61c83f641f14934a4dd821 | |
parent | 7330eb57be46a8fcb37366719069ef0e0b68899c (diff) | |
download | qutebrowser-30e8892135dbd2fd6897d34fbfda7279101911c5.tar.gz qutebrowser-30e8892135dbd2fd6897d34fbfda7279101911c5.zip |
Improve CodeMirror insert mode detection
-rw-r--r-- | doc/changelog.asciidoc | 2 | ||||
-rw-r--r-- | qutebrowser/browser/webelem.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 8e9386101..58e560f2f 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -57,6 +57,8 @@ Changed a timeout) on PyQt 5.13.1 and newer. - The `:spawn` command has a new `-m` / `--output-messages` argument which shows qutebrowser messages based on a command's standard output/error. +- Improved insert mode detection for some CodeMirror usages (e.g. in + JupyterLab and Jupyter Notebook). - Performance improvements for the following areas: * Adding settings with URL patterns * Matching of settings using URL patterns diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 59abd8113..10abb6f2d 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -218,6 +218,7 @@ class AbstractWebElement(collections.abc.MutableMapping): 'kix-', # Google Docs editor 'ace_'], # http://ace.c9.io/ 'pre': ['CodeMirror'], + 'span': ['cm-'], # Jupyter Notebook } relevant_classes = classes[self.tag_name()] for klass in self.classes(): @@ -252,7 +253,7 @@ class AbstractWebElement(collections.abc.MutableMapping): return config.val.input.insert_mode.plugins and not strict elif tag == 'object': return self._is_editable_object() and not strict - elif tag in ['div', 'pre']: + elif tag in ['div', 'pre', 'span']: return self._is_editable_classes() and not strict return False |