Skip to content

不要添加 openerTabId#586

Merged
CodFrm merged 2 commits intoscriptscat:mainfrom
cyfung1031:no_opener
Jul 30, 2025
Merged

不要添加 openerTabId#586
CodFrm merged 2 commits intoscriptscat:mainfrom
cyfung1031:no_opener

Conversation

@cyfung1031
Copy link
Collaborator

    // 不要添加 openerTabId
    // 会出现 Error "Tab opener must be in the same window as the updated tab."

未有時間處理 其他PR提交
但這個BUG要先處理

Brave會無法彈出安裝頁

@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

不添加openerTabId的话,又会导致之前的zen #548 的问题,另外也会影响关闭tab会返回到前一个tab,而不是之前的tab

@cyfung1031
Copy link
Collaborator Author

@CodFrm 改成先試 openerTabId
不行再試沒有openerTabId

@CodFrm CodFrm merged commit b861fc8 into scriptscat:main Jul 30, 2025
2 of 3 checks passed
@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

说起来这样的话,我在其它地方也用了openerTabId,Brave为什么会这样,算不算是Brave的BUG

@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

是不是其它问题导致的?我看openerTabId也有描述:The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.

https://developer.chrome.com/docs/extensions/reference/api/tabs

但是我也没有指定windowId

@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

我使用Brave没有复现出这个问题

MacOS
Brave 1.80.120 (正式版本) (arm64)
Chromium: 138.0.7204.101

@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

复现了,只需要单独打开一个新窗口(或者多个浏览器窗口),就会出现这个情况,并不是Brave的原因

正确的解决方式应该是,增加上windowId: tabs[0].windowId

@CodFrm
Copy link
Member

CodFrm commented Jul 30, 2025

我对其它地方也进行了修改:54c1da2

@cyfung1031 cyfung1031 deleted the no_opener branch August 23, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants