如何防止切换到 js window.opener 上的 opener 选项卡在 firefox 中重新加载

how to prevent switch to opener tab on js window.opener reload in firefox

在 JavaScript 中以这种方式重新加载开启器 window 时:

window.opener.location.href = window.opener.location.href;

打开器选项卡在 Firefox 中获得焦点,这是不可取的。 我在 Chrome 中没有这种行为。 这可能是由于 Firefox 更新,因为这是一个旧系统,以前没有报告过这个问题。

这是 https://bugzilla.mozilla.org/show_bug.cgi?id=1694927,已在 Firefox 87 中修复。