Opening a new unfocused tab in Chrome with webbrowser.open

未關閉
#92,683 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
python
領域
desktop

研究方向

從 webbrowser.open 入口開始,使用列出的 new 和 autoraise 組合,在 Windows 11 和 Chrome 上重現所回報的行為。確定在此環境中,文件所述的選項是否應該控制分頁焦點;完成要求要麼是確認修正並提供回歸覆蓋,要麼是釐清 issue,記錄該平台限制。

由索引模型根據 Issue 內容生成。

描述

OS-windows stdlib type-bug

OS → Microsoft Windows 11
Chrome Version → 101.0.4951.54 (official version) 64 bits

I have Google website open and I want to open the Stackoverflow website in a new tab but the screen keeps showing the Google website.

All possible combinations I've tried to use but the page still opens and pulls the focus to it, my attempts were:

sof = 'https://stackoverflow.com'
webbrowser.open(sof, new=0, autoraise=False)
webbrowser.open(sof, new=2, autoraise=False)
webbrowser.open(sof, new=0, autoraise=True)
webbrowser.open(sof, new=2, autoraise=True)

All indications of use for such a function, lead me to the webbrowser + autoraise, I believe there is a problem.

主要語言
Python
星號
77.2k
分支
36k
平均合併
1 天 9 小時
30 天內合併 PR
558

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

python/cpython 的其他 Issue

查看 python/cpython 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。