eoger / tabcenter-redux

Vertical Tabs extension for Firefox
Mozilla Public License 2.0
381 stars 67 forks source link

Owner tab not selected when closing new tab #353

Closed Keith94 closed 4 years ago

Keith94 commented 6 years ago

The select owner on close behavior works in most cases, such as searching text with Google or clicking TCR's settings button and closing that tab; however, the behavior is broken when closing a new tab.

Steps to reproduce

  1. Make sure browser.tabs.selectOwnerOnClose=true
  2. Have at least two tabs open
  3. Select the first tab
  4. Click the new tab button in Tab Center Redux
  5. Click the close button on the new tab

Actual results

Second tab gets focus

Expected results

Owner tab (first tab) gets focus

Keith94 commented 6 years ago

I found that using Ctrl+T and Ctrl+W selects the owner tab correctly, but the new tab button still has the issue.

eoger commented 6 years ago

I would bet that we need to pass openerTabId to browser.tabs.create

Keith94 commented 4 years ago

https://framagit.org/ariasuni/tabcenter-reborn/commit/a78ebfd64439dafd175ffea3249cac892f062771