Issue with popups in IE10 - javascript

All -
We have surveys on our website, which opens a popup on window unload. The JavaScript code to open the popup is as follows
window.open(URL,'testpopup','toolbar=no,personalbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=775,height=565,screenX=1,screenY=1,top=1,left=1')
The issue is in IE10, when the popup opens in a new tab. The popup has two options 'accept' and 'decline'. When the user clicks on 'decline', it is crashing the entire browser. Here is the close code. I did not see this behavior on my computer, but lot of users have reported this issue
Decline
Could anyone suggest what the issue could be?

Related

Modal doesn't show on specific chrome user

I have a modal that should open on clicking on a button, it opens in incognito mode and opens in guest mode, but it doesn't open when I use my current chrome user (I can see it in the DOM but it doesn't appear on the UI).
It also opens in Firefox.
I tried clearing cache, I tried restarting chrome, I tried allowing Popups and redirection, and I also tried restarting my laptop, nothing has worked.

Can't redirect to new tab from PDF using target='_blank' in Broswers

I don't know whether this is valid or not. I went through some links and tried many solutions but none of them are working.
I have a pdf with some links and then click on that link it has to open a new tab in the browser and do some functionality after that tab has to be closed automatically.
<a target="_blank" href="http://your_url_here.html">Link</a>
I updated the link in the PDF as like that and window.close() is completing the functionality.
It is perfectly working fine when we open the pdf from ADOBE or Foxit Reader or any other PDF reader. But the problem is all the latest browsers have the support to view the PDFs files in them. When the link is clicked, that's getting redirected on the same tab and the window.close() is throwing the below error.
"Scripts may close only the windows that were opened by it."
I am not exactly sure whether browser PDF viewers have the support or not. Can somebody help me with this problem or have any idea if this can be achieved?
Test Video

Safari blocking popups

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.

Facebook login button doesn't work on Firefox

I'm using Facebook's javascript SDK CDN and a button to log my users who prefers to login with their Facebook account.
However my Facebook login button works on every browser besides Firefox.
This is the button I'm implementing;
<button class="fb-login-button" data-scope="public_profile,email" onlogin="checkLoginState();" name="facebook" value="facebook">FACEBOOK</button>
What's wrong with the code that deals with Firefox? It only refreshes the page on click.
I was able to fix the login button with:
The Refresh feature (called "Reset" in older Firefox versions) can fix many issues by restoring Firefox to its factory default state while saving your bookmarks, history, passwords, cookies, and other essential information.
Note: When you use this feature, you will lose any extensions, toolbar customization, and some preferences. See the Refresh Firefox - reset add-ons and settings article for more information.
To Refresh Firefox:
Open the Troubleshooting Information page using one of these
methods: Click the menu button "top left corner", click help and
select Troubleshooting Information.
A new tab containing your troubleshooting information should open.
If you're unable to access the Help menu, type about:support in your address bar to bring up the Troubleshooting Information page.
At the top right corner of the page, you should see a button that
says "Refresh Firefox" ("Reset Firefox" in older Firefox versions).
Click on it. Firefox will close. After the refresh process is
completed, Firefox will show a window with the information that is
imported.
Click Finish and Firefox will reopen.

Process Javascript in inactive tab on iPad

I have this solution that takes the user through a series of questions. At the end the user can click a button that opens a new window with a form to enter contact info. The population of this popup window is done through JavaScript from the calling window.
The process (in JS) is this:
Open popup window with loading gif
Store additional information remotely through ajax
Populate popup window with contact form
This all works fine in desktop browsers but not on iPads (using Safari where all windows are displayed as tabs). I have a suspicion that the JavaScript in the parent tab is halted when the "popup" tab gets displayed. To support this theory I can actually get the popup tab populated if I switch back to the parent tab immediately after the popup tab is displayed.
Can anyone confirm this? And of course if there's a solution I would very much like to hear about it.
Needless to say it works like a charm on my Android tablet :-)
Try using window focus and blur to activate some javascript when the focus is back on your tab.
See: https://stackoverflow.com/a/3479936/1712686

Categories

Resources