From f64d87de3d1e0655c94baf3bf240b699005198ea Mon Sep 17 00:00:00 2001 From: WangXu <103350664@qq.com> Date: Wed, 1 Mar 2023 16:54:55 +0800 Subject: [PATCH] Fix #691 and #752 --- content_scripts/command.js | 6 ++++-- content_scripts/main.css | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/content_scripts/command.js b/content_scripts/command.js index fe876114..39ad1a46 100644 --- a/content_scripts/command.js +++ b/content_scripts/command.js @@ -940,7 +940,8 @@ Command.show = function(search, value, complete) { Status.hide(); } this.bar.style.display = 'inline-block'; - setTimeout(function() { + // NOTE(tk) temp fix cf. https://github.com/1995eaton/chromium-vim/issues/691#L943 + var timerId = setInterval(function() { this.input.focus(); if (complete !== null) { this.complete(value); @@ -954,7 +955,7 @@ Command.show = function(search, value, complete) { // TODO: figure out why a842dd6 and fix for #527 are necessary // document.getSelection().collapseToEnd(); document.getSelection().modify('move', 'right', 'lineboundary'); - + clearInterval(timerId); } // End temp fix @@ -1299,3 +1300,4 @@ Command.configureSettings = function(_settings) { this.init(false); } }; + diff --git a/content_scripts/main.css b/content_scripts/main.css index d5cc2187..c0751034 100644 --- a/content_scripts/main.css +++ b/content_scripts/main.css @@ -9,6 +9,7 @@ top: 0; height: 100%; z-index: 2147483647 !important; + color-scheme: auto; } #cVim-link-container {