Bug 107918 - javascript alert() locks focus -> tab can't be closed
Summary: javascript alert() locks focus -> tab can't be closed
Status: REOPENED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: 3.4.1
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-22 15:25 UTC by Jan Kundrát
Modified: 2010-04-05 23:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
konq-alert.html (134 bytes, text/html)
2007-12-13 12:13 UTC, Jan Kundrát
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát 2005-06-22 15:25:13 UTC
Version:           3.4.1 (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
 
OS:                Linux

Open http://www.brmbrm.wz.cz/ in konqueror. This page has a *lot* of "<script> alert('blah');</script>"-like lines. When the javascript window pops up, you can't any longer access main window of konqueror and keyboard shortcuts don't work anymore.

Simple kill will kill entire session with all open tabs. Good folks on #kde pointed me to the DCOP stuff, so I used `dcop konqueror-$PID html-widget* setJScriptEnabled false` which did the job.

Suggestion: allow the alert window to give its focus away because I don't think that most users will play with DCOP.
Comment 1 lexual 2005-07-11 16:01:05 UTC
confirming for 3.4.1, visit that link and you can't close the konqueror window or do anything in konqueror.
Comment 2 lexual 2007-12-13 02:44:15 UTC
site now invalid?
Comment 3 Jan Kundrát 2007-12-13 12:12:47 UTC
Site that is no longer accessible doesn't magically make that problem go away.
Comment 4 Jan Kundrát 2007-12-13 12:13:40 UTC
Created attachment 22523 [details]
konq-alert.html

This file should be enough. It displays ten alert boxes before letting you
close the web page.
Comment 5 David Faure 2010-04-03 00:14:33 UTC
Don't all web browsers behave the same on such pages?
Comment 6 Jan Kundrát 2010-04-05 22:55:06 UTC
David, even though it very well could be a common behavior (I haven't studied any heuristics about the maximal number of popups to show), it doesn't change anything on the fact that such a behavior is extremely annoying.

The only way for a user to deal with such a page is to kill the whole session, possibly losing all work (alert popups are modal per window, not per tab).
Comment 7 Maksim Orlovich 2010-04-05 23:18:53 UTC
The "good" way of dealing with this (which I think Opera(?) offers) is to have a script-killing checkbox in the alert. Hmm, I really ought to be the person to know how script killing should work, shouldn't I?