Javascript Alert from inactive tab breaks active tab
-
Linux, Debian 11, 5.6.2867.50 (Stable channel) stable (64-bit)
I've been suffering stuck browser lately. Maybe since I migrated to new notebook. I think I just figured it out.
I was using messages dot google (allows using your browser to read and write SMS after paring browser w/ Android phone). Then the page became non responsive. I could close tabs, open new, pin/unpin, but nothing in any tabs worked. Then I switched to the tab with my Google Calendar. Visible only on the Calendar tab is a javascript alert for an upcoming event. Acknowledging the javascript alert fixed it. -
and, found I had accidentally blocked Notifications from calendar dot google. After granting Notification to page, works as expected.
Still a problem I think, if any inactive tab that raises a Javascript Alert can halt all others. -
@s0hughes A modal JS alert blocks interaction with the tab it was created in.
That is a known Vivaldi issue, was seen on Google pages.
VB-90552 "Alert modal window blocks other tabs on same domain"
But as i can see Firefox, Chromium and Edge block all interaction with the tab until JS alert it is conformed. -
@s0hughes Hi - does it happen for you also on this test page that triggers an alert after 3 seconds, if you change to another tab and wait?
https://whatanswered.com/websites-javascript/javascript-simple-alert-with-delay.php
Try also opening a new tab to the same domain (clone the tab), and see if it happens only with the same domain.
I've tried to reproduce it there and also using G Calendar and the JS alert only appears once the tab is focused again. I do remember an issue like this but it was a good while ago (VB-90x also suggests it was old.)
I'm wondering if maybe it's only on Linux? I'm on Windows 10 x64.
@DoctorG JS alerts are supposed to be modal, so should block interaction with the page until closed, so that's correct behaviour:
https://developer.mozilla.org/en-US/docs/Web/API/Window/alert -
the halt is limited to same domain, so not terrible.
If I open two tabs to the whatanswered JS example, then yes, the one with an modal JS alert open, will prevent even scrolling in the other tab of the same domain. All other tabs seem to be unaffected. -
@s0hughes As i said before, a known but nasty issue.
But as i know modal popups of a UI are supposed to block until user confirms.