This simple code:
<button onclick="window.open('https://google.com', 'my-tab')">open google</button>
Works fine in Chrome, but in Firefox (latest v75) it opens always, but activates a new tab only the first time.
The same tab as in step 2 gets opened and activated (gets visible)
The same tab as in step 2 gets opened but not activated (doesn't get visible)
Is this a bug in Firefox or I'm missing something?
Here try this:
<button onclick="window.open('https://google.com', 'my-tab').focus()">open google</button>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.