Try to fix Windows caret ussues
This commit is contained in:
parent
db16a87e68
commit
882beab3f2
@ -468,6 +468,9 @@ window._qutebrowser.caret = (function() { // eslint-disable-line max-statements,
|
|||||||
|
|
||||||
CaretBrowsing.blinkFlag = true;
|
CaretBrowsing.blinkFlag = true;
|
||||||
|
|
||||||
|
CaretBrowsing.isWindows =
|
||||||
|
window.navigator.userAgent.indexOf("Windows") !== -1;
|
||||||
|
|
||||||
CaretBrowsing.isControlThatNeedsArrowKeys = function(node) { // eslint-disable-line complexity,max-len
|
CaretBrowsing.isControlThatNeedsArrowKeys = function(node) { // eslint-disable-line complexity,max-len
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return false;
|
return false;
|
||||||
@ -860,9 +863,15 @@ window._qutebrowser.caret = (function() { // eslint-disable-line max-statements,
|
|||||||
getSelection().
|
getSelection().
|
||||||
modify(action, direction, granularity);
|
modify(action, direction, granularity);
|
||||||
|
|
||||||
window.setTimeout(() => {
|
if (CaretBrowsing.isWindows &&
|
||||||
CaretBrowsing.updateCaretOrSelection(true);
|
(direction === "forward" ||
|
||||||
}, 0);
|
direction === "right")) {
|
||||||
|
CaretBrowsing.move("left", "character");
|
||||||
|
} else {
|
||||||
|
window.setTimeout(() => {
|
||||||
|
CaretBrowsing.updateCaretOrSelection(true);
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CaretBrowsing.moveToBlock = function(paragraph, boundary) {
|
CaretBrowsing.moveToBlock = function(paragraph, boundary) {
|
||||||
|
Loading…
Reference in New Issue
Block a user