Closed
Bug 33020
Opened 25 years ago
Closed 25 years ago
file: URL not loaded in XUL browser window
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
INVALID
People
(Reporter: moz_user, Assigned: trudelle)
Details
From Bugzilla Helper:
User-Agent: Mozilla/4.61 [en] (X11; U; Linux 2.2.12-20smp i686)
BuildID:
With M13, I was able to use a NON navigation:browser window to display HTML
files. If the user clicked on a link (<a href>) within the window, the new page
would be displayed inside the content area of my XUL window.
However, I've noticed with M14, the behavior has changed. The initial window
looks the same, but when I click on a link, it will either display it in the
browser window (creating one if necessary).
Reproducible: Always
Steps to Reproduce:
1. Create XUL window containing following element: <html:iframe id="foo"
type="content-primary" flex="1"/>
2. Click on a link (<a href>) in the displayed HTML document.
3.
Actual Results: The link was displayed in a navigation:browser window (creating
one if necessary).
Expected Results: The new URL should have been loaded into the window
containing the <html:iframe> element.
The window was initially launched with the following JavaScript:
function launchOnlineHelp()
{
// Display the corresponding help page
window.openDialog("chrome://help/content/help.xul",
"", "chrome,resizable,dialog=no",
"file:///help_main.htm");
}
-----------------------------------------------------------
help.xul
-----------------------------------------------------------
<?xml version="1.0"?>
<window id="helpWindow"
title="On-line Help"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
style="background-color: white;"
width="550"
height="400"
onload="onLoad();">
<html:script language="javascript" src="chrome://help/content/help.js" />
<browser id="help" type="content-primary" flex="1"/>
</window>
-----------------------------------------------------------
help.js
-----------------------------------------------------------
function onLoad()
{
// Was an argument passed during the window load?
if (window.arguments && window.arguments[0]) {
var element = document.getElementById('help');
if (element) {
element.setAttribute('src',window.arguments[0]);
}
}
else {
dump("** (js)onLoad, no argument passed!\n");
}
}
-----------------------------------------------------------
help_main.htm
-----------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>On-line Help</title>
</head>
<body>
<h1>On-line Help</h1>
<p>Click on a link below for more information:</p>
<p><a href="foo_help.htm">foo</a></p>
</body>
</html>
-----------------------------------------------------------
help_foo.htm
-----------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Foo Help</title>
</head>
<body>
<h1>Foo Help</h1>
<p>If I knew more about "foo", I would explain it here</p>
</body>
</html>
Comment 1•25 years ago
|
||
becki@talkware.net - I am trying to get this bug seen to. However, it is very
possible that the many changes made to Mozilla between when you submitted it and
now mean this test case no longer works (and the problem may be fixed anyway).
Could you possibly check that it does, zip up all the files, and attach them to
this bug (using the "Create a new attachment" link)? If you don't have
permission to do that, email me the file and I will.
Gerv
Comment 2•25 years ago
|
||
becki@talkware.net - we really need your input on this bug, otherwise it will
get closed, and that would be a shame, seeing as you seem to have done a lot of
work on it...
Gerv
Reporter | ||
Comment 3•25 years ago
|
||
Sorry I've been out of touch and unable to test the bug I reported. An
untimely appendectomy on 5/19 took me out of commision for a month. I'm
back to my PC so I'll check my bug against M16 and report back to you
as soon as I can.
--- becs
Reporter | ||
Comment 4•25 years ago
|
||
Here are some initial findings with M16. I'm able to display a XUL window
containing <browser> element where the src attribute is set to a URL (e.g.
"http://www.mozilla.org") or "about:blank" without any problems. However, when
I attempt to specify a file (e.g. "file:///home/user/help_main.htm"), no content
area is displayed (verified by setting the window's background-color). I don't
have a problem using the browser's "Open File..." menu item to access the
mentioned file, so I don't think the problem lies with the actual file. I just
can't get a file to be displayed as the start page. (For kicks and grins, I
even changed the browser.startup.homepage preference to point to the file and it
doesn't get displayed that way either.)
I should point out that I changed the onLoad() js function to first create a
browser instance (appCore) and then call
appCore.setWebShellWindow(this.window). This approach allowed me to get my
example to work in M15.
Comment 5•25 years ago
|
||
becki@talkware.net (Becki Sanford), so is this a different problem than "New URL
not loaded in same html:iframe" now?
Reporter | ||
Comment 6•25 years ago
|
||
Since I was able to create a XUL window and change URLs within that window (i.e.
does not load new URLs into any open browser window), the original problem
appears to be fixed. The file access issue should still be addressed.
Comment 7•25 years ago
|
||
Triaging Rickg's buglist:
This developer is able to create a XUL browser window that starts up with
an http: url, but unable to create a browser window that starts up a file: url.
There is a good amount of detail above.
Reassigning to component owner. Please reassign as necessary, thanks!
Assignee: rickg → trudelle
Component: HTML Element → XP Toolkit/Widgets: XUL
QA Contact: petersen → jrgm
Summary: New URL not loaded in same html:iframe → file: URL not loaded in XUL browser window
Reporter | ||
Comment 9•25 years ago
|
||
I was able to succesfully set the src attribute of a <browser> element with a
"file:///" string when using window.openDialog in my JavaScript. I tracked it
down to a short between the keyboard and the user (a bad symbolic link). I'm
still not able to set the pref("browser.startup.homepage") to a file though.
Sorry about the false alarm. :(
Comment 10•25 years ago
|
||
ok, then closing.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•