vimium icon indicating copy to clipboard operation
vimium copied to clipboard

`O` new tab opens as the last tab instead of to the right of the current one

Open halvabner opened this issue 6 months ago • 3 comments

Describe the bug

O new tab opens as the last tab instead of to the right of the current one

To Reproduce

  1. Type O
  2. Type foo
  3. Press RETURN

Browser and Vimium version

Chromium 137.0.7151.55 (Official Build) Arch Linux (64-bit) Revision 254bc711794d7ad269495f3d419a209935b78cad-refs/branch-heads/7151@{#1757} OS Linux JavaScript V8 13.7.152.10 User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Command Line /usr/lib/chromium/chromium --app --enable-features=WebUIDarkMode --force-dark-mode=enabled --flag-switches-begin --disable-smooth-scrolling --enable-features=WebUIDarkMode,EnableTabMuting,ScrollableTabStrip:minTabWidth/72,kScrollableTabStripOverflow:tabScrollOverflow/2,kScrollableTabStripWithDragging:tabScrollWithDragMode/2 --flag-switches-end

Vimium Version 2.2.1

halvabner avatar Jun 15 '25 13:06 halvabner

Tried to check on my enironment: Vimium 2.3 with Firefox 128 ESR opens to the right on the current one

IMMZ avatar Jul 05 '25 12:07 IMMZ

I have the same problem on Arch Linux too. I'll try to fix it.

NI57721 avatar Sep 07 '25 02:09 NI57721

This seems to be happened because of the change of the behaviour of chrome.search.query in some environments. https://developer.chrome.com/docs/extensions/reference/api/search#method-query

chrome.search.query({disposition: 'NEW_TAB', text: 'foo'}) creates a new tab as the last tab instead of to the right of the current one on my environment.

  • Google Chrome: 140.0.7339.80
  • Vimium: 2.3
  • OS: Arch Linux

We can avoid this by using chrome.runtime.sendMessage instead. I've made sure this works only on my environment.

chrome.runtime.sendMessage({
      handler: "openUrlInNewTab",
      url: "foo",
    });

@philc What would you say to this workaround?

NI57721 avatar Sep 07 '25 04:09 NI57721