I have a site that uses pop-ups for certain areas of the site (which have target="_blank"), and I have noticed that Safari on iOS devices tends to open these pop-ups in the background, while keeping focus on the current tab, and not switching to the pop-up when it opens.
Is there a way / workaround to prevent Safari acting like this and instead open them in foreground and focus on them when they open?
Thanks!
Related
I have a twitter sign in, it's known that Google and Facebook have their own script for opening sign in popup and it somehow works even on Safari, but twitter doesn't. So we implemented our own, the issue we face is that IOS devices are blocking popup opened with:
window.open(url, '_blank', 'height=400,width=800,left=250,top=100,resizable=yes', true);
I've also tried creating an anchor tag after reading (Bypassing popup blocker in safari):
<a id="js__twitter__popup-link" target="_blank" style="visibility: hidden;"></a>
Then we add url to href this.twitterPopupLink.setAttribute('href', url), then document.querySelector("#js__twitter__popup-link").click(), but on IOS it won't open a new page even that way.
Tester said that on iPad popup is opened but using IOS emulators it didn't open for me on iPad. It's a sure thing that it doesn't open popup on iPhone through.
on IOS it won't open a new page even that way
Correct. The point of a popup blocker is to prevent popups. Any workaround you can imagine they've probably also imagined and prevented.
In general, you can only open a popup window in one scenario - immediately after a user-initiated click. Triggering a click via JavaScript won't bypass this.
One my webpage I have a bootstrap model opened which has a form with two text boxes and few buttons. When I touch text box keyboard opens which is what I would expect but when I press done (on top of open keyboard) to close keyboard, safari on iPhone it scrolls all the way to the top of the page. This is causing model to loose focus and scroll events are being sent to underlying main page. So the question is, is there any way to get keyboard close event so that I can override this behaviour or any other way prevent it from happening. It's only happening on iPhone chrome and iPhone safari. It works fine on android chrome.
I'm currently developing a chrome extension which needs to track the currently active tab, or the lack thereof. I have the following listeners running in the background:
chrome.windows.onFocusedChanged
chrome.windows.onCreated
chrome.idle.onStateChanged
chrome.tabs.onUpdated
chrome.tabs.onActivated
The issue is that when I have a chrome window full screened on my Mac, and three finger swipe away from it, chrome.windows.onFocusedChanged doesn't activate, which means that my extension believes that the last tab is still active even though the user has switched away from the chrome window. Is there a way to detect when a user switches away from a full screen chrome window on OS X?
Thanks!
I have thin client station, we are using Web Browser Control(the taskbar and start menu are disabled) Web Browser Control is the only option that user can access to the internet.Every thing is fine till here.But there are Particular Links in some pages where new IE window will open(Page will open in new ie window). If the IE Window is minimized the user's cannot see it. If there are 20 of IE7 minimized then the system hangs.
i cant use Kiosk Mode (iexplore -k). because user should allowed to close.
I cant change web pages.
But i Can inject Javascript(no Jquery) in to the Pages.
How Can i Hide/Disable Minimize, if i cant is there is any work around for this.
In my webapp I work with new Tabs I open with window.open. Sometimes, a tab with the target-name is already open in the background and the window.open(..., "sametarget") only reloads it, which is fine - but the Tab stays in the background after reloading, which is not. Is there any way (JavaScript? window.open parameter?) to get it to the foreground after reloading? Or is this prohibited by browser security?
I am trying this in IE7 / IE8.
Does window.focus() solve your problem?
EDIT
Possibly not: Possible to set tab focus in IE7 from JavaScript