Broken move-to-end-of-word
in caret mode on Windows
#8146
Labels
bug: behavior
Something doesn't work as intended, but doesn't crash.
language: javascript
Issues which require knowing JavaScript.
os: Windows
Issues which only happen on Windows.
priority: 2 - low
Issues which are currently not very important.
With qutebrowser v3.1.0 and QtWebEngine 5.15.2, on Windows, pressing
e
in caret mode ontests/end2end/data/caret.html
results in:|one two three
→one| two three
→one two| three
→one two thre|e
with the last one obviously being incorrect.
On Qt 6.2 to 6.5, the behavior got worse, with the first
e
jumping toone| two three
, and then the cursor being stuck there (and not jumping over the space) even with furthere
keypresses. This looks to be due to a behavior change inwindow.getSelection().modify("move", "forward", "word")
between Chromium 83 and Chromium 90 somewhere, though I couldn't find the exact culprit.With
"extend"
in place of"move"
, Chromium 83 (QtWebEngine 5.15) results inone| two three
→one[ two ]three
as selection, but Chromium 90 results inone[ ]two three
instead.Together with our workaround here:
qutebrowser/qutebrowser/javascript/caret.js
Lines 1163 to 1168 in 4815428
which is due to Chromium following platform-specific behavior of including the trailing space:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/editing_behavior.h;l=99-107;drc=03d34ce775fcc7578d9b2507f66f12cb05f5a205
this results in us just clearing the selection and thus further
e
keypresses not doing anything useful.That in turn results in test failures on Windows:
I'm not sure how to best fix this. We might need to manually inspect and adjust the selection or something to prevent the Chromium behavior. In the meantime, I'm going to adjust the tests so they don't use
move-to-end-of-word
I suppose...The text was updated successfully, but these errors were encountered: