Bug 76674 - When browser is opened by starting it with a URL on the command line, the HTML document in that URL may close the window w/o confirmation
Summary: When browser is opened by starting it with a URL on the command line, the HTM...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-03 18:04 UTC by Oded Arbel
Modified: 2008-05-04 23:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Navigate to the next page (62 bytes, text/html)
2006-08-09 09:54 UTC, Oded Arbel
Details
close the window (64 bytes, text/html)
2006-08-09 09:54 UTC, Oded Arbel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2004-03-03 18:04:40 UTC
Version:           3.2.0 (using KDE 3.2.90 (CVS >= 20040117), compiled sources)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-3mdk)
OS:          Linux (i686) release 2.6.1-1mdk

If the document in a URL from the command line tries to execute window.close(), the window would immidietly close with out a confirmation dialog.

IMO this should work exactly as if the user opened a browser window and then typed the URL in the location bar - in which case a confirmation dialog "do you want to close this window" will popup.
Comment 1 Oded Arbel 2004-03-03 18:05:38 UTC
Just a note: might this be related to Bug 76104 ?
Comment 2 lexual 2006-08-09 01:09:35 UTC
any chance of a testcase?
Comment 3 Tommi Tervo 2006-08-09 09:42:04 UTC
Test case:
<script>
window.close()
</script>
Comment 4 Oded Arbel 2006-08-09 09:53:32 UTC
Apparently if you open a page from command line, and from that page navigate (using links) to another page which attempts to close the browser - the notification dialog does show up. I'm pretty sure it was done on purpose, but I don't understand that purpose.

For reference, try to load http://www.geek.co.il/test1.html from the command line, and then try to load http://www.geek.co.il/test2.html directly.
Comment 5 Oded Arbel 2006-08-09 09:54:25 UTC
Created attachment 17302 [details]
Navigate to the next page
Comment 6 Oded Arbel 2006-08-09 09:54:57 UTC
Created attachment 17303 [details]
close the window
Comment 7 FiNeX 2008-05-04 23:26:23 UTC
Bug fixed on 3.5.9 AND 4.1 (trunk r802881)