Unfortunately, I can't reproduce the issue in jsfiddle, but this test file reproduces the issue: github file
Basically, I have a standard popup and a close button inside that popup. I can open the popup. I can close the popup. I can do this over and over again without a problem.
However, when I bind the "popupafterclose" event to the popup, which reopens the popup after receiving that event. Now something weird happens.
On my iPhone 5S's Chrome (v38.0.2125.67), after the second close, the page goes back beyond the popup and to the previous page, as if it was hitting "back" twice.
This only happens on my phone's chrome. The test page works fine on my phone's safari. it also works fine on my mac's chrome (v38.0.2125.104).
I suspect this may be some sort of bug prevention mechanism (like preventing too many popups or infinite loops), but wanted to confirm. I'm hoping I'm just doing something wrong in my code.
If you comment out the "popupafterclose" event, you'll see that you can open/close the popup again and again in every browser including mobile chrome. But automatically re-opening the popup and closing it leads to backing out twice.
You may be wondering why I would want to immediately open the popup after I just closed it. My app has a "play" function that initiates the popup. Upon closing it, I want it to continue to "play" after the popup closes, and some time later, the popup may initiate the popup again. After closing that second instance of the popup, my app backs out of itself.
Related
i had took a look to another threads about chrome and custom protocol apps, but i couldn't resolve a doubt i've got. In my web app, when you click a button it fire a new tab with an webpage (window.open(url, "_blank")). The new tab is opened with the url (annother web app with https protocol). This url fire a javascript function on load that verifies some things and then generate a custom url, for example myurl://base64code, and put it in an existing iframe in this way windows.frames['myframe'].location.href=theCustomProtocolUrl. i tried in different ways (location.replace, create a new iframe and set the url, etc) and i always have the same problem. If i refresh (ctrl f5) the page it always show the dialog or if i open the link with the developer console opened. But if i click my button and the page is opened in a new tab it doesn't work only if i refresh (ctrl+f5). This works perfectly on IE11, it launch the app directly.
Any ideas why chrome, and edge, works like this?
UPDATE: I have found the reason, is i use the protocolcheck.js (https://gist.github.com/vladimirtsyupko/cfcd332476b16683bb0b) library.
First i tried to open a protocol with the timeoutHack (it use blur event) and then, after failing, it fires the other url (in this case https) and the dialog doensn't appear. I found a bug with blur event on chrome > 85 https://bugs.chromium.org/p/chromium/issues/detail?id=1137801
Thanks in advance
Clicking on a link to our webpage using
Link
opens a new tab and closes it immediatly. This happens on all browsers apparently. Deactivating adblock and alike does not change anything.
Using the url without target="_blank" or right click -> open in new Tab however works fine.
The web page is an angular project and does not use any sort of trackers. Furthermore this behavior started only recently, so I assume it's due to some change in the page.
Any hint why this happens or where to start debugging this?
Found it.
I had a line window.close(); due to a workaround for a popup for facebook login, implementing this:
Facebook Login not working in PWA app if app is in stand alone state
I have a popup window which has a cancel button. I want the window to close on the click of the button. The window.close() function performs the task in Chrome, but not on other browsers. Or even app. I want the popup to close on web and app both. Please help.
<button onclick="window.close()" class="cancel">CANCEL</button>
As discussed in the comments, the browser might prevent you from closing a window through window.close() if said window was not opened by Javascript in the first place (i.e. window.open()). (1)
You can confirm this by checking the browser console, which reports the following error:
Scripts may close only the windows that were opened by it.
The solution to such problem would be to ensure that said window is opened through window.open().
(1) https://developer.mozilla.org/en-US/docs/Web/API/Window/close
The Chrome GA debugger does not appear to work. I can't find any info about how to fix it either.
There is an icon on the top screen. No window on the bottom, no readout. No feedback.
Compounding the problem is that searching for 'analytics debugger does not work' returns only results about setting up analytics or problems associated with GA or Chrome.
I'm starting this thread because none currently exists.
Anyone had this issue?
Are you sure you understand what it is supposed to be doing?
I just installed it. It adds a browser action button that changes state between off and on when clicked. It also reloads the current tab when clicked, but you have to reload other tabs if you need it to take effect there.
The information that GA module outputs goes to the page's JavaScript console. The extension does not automatically open it. You can open it with Ctrl+Shift+J
I found the answer.
You have to open the Chrome javascript console. I doesn't launch automatically.
I am using facebook's js SDK. I use FB.init to initiate the fb object and FB.getLoginStatus to check user's status. Everything works fine when load the page. But when i click some link inside my page and then try to go back to my last page by clicking back button of browser FB.getLoginStatus is not get invoke the callback. This problem occurs only in Chrome's. In all other browsers it works fine.
If i clear the browser catch and then go back then everything is working fine
I also remove the all extension that may causes a problem.
Thanks in advance.