Open
Bug 204328
Opened 22 years ago
Updated 12 years ago
Popup manager blocks local html files from displaying popup window
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
NEW
People
(Reporter: mvolikas, Assigned: jag+mozilla)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030501 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030501 The attached code (worked using Mozilla 1.41a 20030401) would display a popup when the file was loaded from the local hard disk. I configured the Popup Windows Preferences to play a sound when the popup was blocked and determined this was the case. Tried disabling the popup manager and the popup was still blocked. How do I configure the popup manager so HTML files loaded from my hard disk will display the popup? Reproducible: Always Steps to Reproduce: 1. Copy the attached HTML code to your PC's disk drive 2. Click on File --> Open File 3. Select the file Center.HTML Actual Results: The popup was blocked even though I disabled the option. Expected Results: Mozilla should display the popup when the HTML file is loaded from the local disk drive. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <script LANGUAGE="JavaScript"> <!-- function launchCenter(url, name, height, width) { var str = "toolbar=no,menubar=no,resizable=no,location=no,scrollbars=yes,height=" + height + ",innerHeight=" + height; var win = window.open(url, name); win.close(); str += ",width=" + width + ",innerWidth=" + width; if (window.screen) { var ah = screen.availHeight - 30; var aw = screen.availWidth - 10; var xc = (aw - width) / 2; var yc = (ah - height) / 2; str += ",left=" + xc + ",screenX=" + xc; str += ",top=" + yc + ",screenY=" + yc; } return window.open(url, name, str); } <!-- var win = launchCenter('', 'center', 220, 440); --> var win = launchCenter('', 'center', 400, 500); // --> </SCRIPT> </body> </html>
Comment 1•22 years ago
|
||
This has nothing to do with the preferences dialog.
Assignee: ben → mstoltz
Component: Preferences → Security: General
QA Contact: sairuh → carosendahl
Comment 2•22 years ago
|
||
I cannot reproduce the problem - I open up local files without popup blocking and popups appear. Please attach the html in the form of an attachment.
Reporter | ||
Comment 3•22 years ago
|
||
I will attach a jpg file showing what is displayed when the file is opened with Internet Explorer. This code use to work correctly with Mozilla version 1.4a 20030401.
Reporter | ||
Comment 4•22 years ago
|
||
The attached jpg shows the popup displayed correctly using IE; this code use to work correctly with Mozilla version 1.4a 20030401.
Comment 5•22 years ago
|
||
> var win = window.open(url, name);
> win.close();
For me, the window opens, and gets closed right away. And that is expected. Does
removing that win.close() fix it?
Comment 6•22 years ago
|
||
I am using build 20030502 and it does work - the popup appears whether I use the file or http protocol when popup blocking is disabled. Try creating a new profile and see if this works - at least you can isolate whether it is profile specific or at the app level.
Comment 7•22 years ago
|
||
yes - why are you opening the window, closing it, and then returning with a window.open call? Try removing this as well: var win = window.open(url, name); win.close(); I do not believe this is a bug.
Comment 8•22 years ago
|
||
> <!-- var win = launchCenter('', 'center', 220, 440); -->
That is not really a comment. At least not for javascript.. Try to remove that also.
Reporter | ||
Comment 9•22 years ago
|
||
Charles & Michiel, this is a very simple example of the problem I am experiencing. The intent of the script is to close the popup window if it was previously opened and redisplay the popup. I developed 924 HTML pages were this code use to work with Mozilla 1.4a. I hate IE but this code works perfectly with IE.
Comment 10•22 years ago
|
||
Did you try the new profile? As I said, on my win2k system, it works in a new profile without problem.
Reporter | ||
Comment 11•22 years ago
|
||
The code I am using came from http://www.webreference.com/js/tutorial1/utilize.html; "Opening a Centered Window". Click on the button in the Opening a Centered Window section (towards the bottom of the page) and the popup will be displayed. Now save this page to your local disk drive and try the same thing; the popup is displayed momentarily and it is closed. As far as I am concerned this is a bug. No; I did not try the new profile.
Reporter | ||
Comment 12•22 years ago
|
||
I just created a new profile and the popup window was NOT displayed when I loaded the file from from my local disk drive.
Comment 13•22 years ago
|
||
Are you running a machine with memory or cpu constraints? You might be missing an event? What happens when you alter the code (remove the comment and the first window.open/close block) to only contain the window.open call on return?
Reporter | ||
Comment 14•22 years ago
|
||
We are making a mountain out of this. Look at my comment #11. Why is the popup blocked when the page is loaded from the local disk drive?
Comment 15•22 years ago
|
||
You say that even with a new profile, which has popup blocking disabled, you still see the icon in the statusbar that tells you that the popup is blocked? That would be strange, and needs investigation. Did you try to remove those three lines in the script? Without them, i see the popup. With them, i see a new window being opened, and closed real fast after that. If removing those lines works, this is not a popup blocking issue, but some other javascript/dom thing.
Reporter | ||
Comment 16•22 years ago
|
||
I deleted the lines as suggested in comment #5 and the popup window was displayed when I disabled the Popup Manager. The code work the same if I deleted the line of code as suggested in comment #8 or leaving it in. I then blocked the popup manager and redisplayed the page. I clicked on the icon in the statusbar that tells you that the popup is blocked and could NOT configure it to allow the page loaded from the local drive to display the popup window. Once again, this is a bug in the current release of Mozilla. This code worked with Mozilla 1.4a. This code works with Internet Explorer version 6.0.
Comment 17•22 years ago
|
||
So that means that the bug is: "No way to add local files to the list of sites allowed to show popups"? The reasen that is os, it that there is no host associated with the local drives, and the list is host based. That means we need some special entry or something.
Comment 18•22 years ago
|
||
danm, is this stuff yours?
Assignee: mstoltz → danm
Component: Security: General → Security: CAPS
Comment 19•22 years ago
|
||
These have been going to XPApps.
Assignee: danm → jaggernaut
Component: Security: CAPS → XP Apps
QA Contact: carosendahl → paw
Reporter | ||
Comment 20•22 years ago
|
||
What is the status with this bug? Firebird (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030712 Mozilla Firebird/0.6) has the same problem with the JavaScript. Comment #17 would provide the needed solution to get this problem resolved.
Comment 22•21 years ago
|
||
According to bug 177106, adding localhost doesn't work, adding local IP works. Dup?
Comment 24•21 years ago
|
||
Just ran into this myself. I think this is a reasonably annoying problem since it affects devs trying to test design on multiple browsers. Is there some way to override pop-up blocking on a protocol basis? Just for file:// ?
Comment 27•21 years ago
|
||
In addition to comment 24: Popup blocker should be configurable to behave differently for file:// and __chrome://__ Currently it blocks also all windows opened from a chrome code, which is wrong IMO. The popup blocker is intended for protecting user from web-sites, not from chrome extensions.
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
Updated•20 years ago
|
Assignee: mvl → jag
QA Contact: pawyskoczka
Comment 30•18 years ago
|
||
This appears to be fixed in Firefox 1.0.4+ Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 We discovered this behaviour in Netscape 7.2, and noticed by accident that it appears to work in Firefox. However Firefox may need a restart before it starts observing the change, or before it starts including scheme:file in the Allowed Sites list. To allow popups from file:/// URLs, add scheme:file to your Allowed Sites popup whitelist, and all file: URLs will now allow popups. Also see bug 204285. I'm not about to change bug status, but I'm guessing this should be changed to resolved/worksforme, unless someone can find what fixed this. There are a number of open bugs with no resolution that seem to be dupes of this (or marked as dupe of bug 204285).
Comment 31•16 years ago
|
||
Just to add my two cents, I'm having the same problem. I can confirm this problem did not exists in 2.x. It is new to 3.x. I have Firefox set to open links in Tabs. On sites that display items in a popup when clicked (like videos), are instead opening them in a new tab. I have tried unchecking the "popup blocker" and even added an Exception to it, but the ONLY way to get these Javascript-based popups to work has been to change the link setting from "New Tab" to "New Windows". This should not be. Very annoying.
Comment 32•16 years ago
|
||
+1 For the latest 3.0.4, it has a similar issue, and then forces me to use IE. :( Use Case: A local HTML file, which needs to popup an Dialog. The URL of this local html file looks like: file:///C:/Documents and Settings/username/Local Settings/Temporary Internet Files/Content.Outlook/abc.htm. As showing in this case, the HTML file which is actually opened from my Outlook (the attachment of an email is HTML file). When the HTML wants to popup another window, there is a blocker bar showing, but the option list is: Allow pop-ups for Edit pop-up... Don't show... The strange is the first option, usually, it says "Allow pop-ups for site", but in this case, there is no site name, so actually, it can not unblock the page to show the popup.
You need to log in
before you can comment on or make changes to this bug.
Description
•