I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent window.
Please suggest a fix.
use case/eg: Well, for eg if you see kayak.com or any travel website, you have the ability to search on other websites too..I want to do something similar so need the pop under...
Code: I am using a window.open(.......).blur(), but for some reason it isnt working in chrome.
This is the fix you can use for Chrome (tested on lastest v.40 on 29/01/2015). This won't open a window popup but a new tab and
keeps on main tab focused(no more keeps focus on main tab on chrome v.43>).To avoid popup blocker, you need user interaction, use specifically
mousedown
ormouseup
event,click
will throw a popup blocker warning.-jsFiddle-