Closed
Bug 245084
Opened 21 years ago
Closed 20 years ago
Javascript in Sidebar is not working properly
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: larrywilliams, Assigned: bugzilla)
References
Details
Attachments
(1 file)
408 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Javascript in sidebar does not work correctly.
See http://forums.mozillazine.org/viewtopic.php?t=80602
for more details. I'm using Firefox 0.8. I could not reproduce it in Mozilla 1.6.
Reproducible: Always
Steps to Reproduce:
See http://forums.mozillazine.org/viewtopic.php?t=80602
Javascript is not working properly in the sidebar.
To test this bug you can use this code.
1. Open page in Firefox. Might have to use http://. Does not work from file://
for me.
2. Click on Add to sidebar link.
3. Access the link from the Bookmarks menu. This should open the sidebar with
the page.
4. Click Test bug. You should get a Javascript error.
5. Open page also in main window. So that you have the page open in both sidebar
and main window.
6. Click Test bug. This should now work.
At least on my machine clicking the Test bug in the sidebar gives me the
following error:
Error: bugs is not defined
Source File: javascript:alert(bugs);
Line: 1
<script language="JavaScript">
<!--
var bugs='There is no bug';
function addSidebar(url)
{
try
{
window.sidebar.addPanel ("Test bug", url, "");
}
catch(ex)
{
alert("Error adding sidbar");
}
}
//-->
</script>
Actual Results:
Javascript should work in sidebar. The Javascript variable defined in the
sidebar should be accessible. But Firefox seems to access the variable from the
main content window instead of the sidebar. You can verify this by opening the
page in both the sidebar and the main window.
Expected Results:
Javascript variables defined in the sidebar should be accessible from the
sidebar not the main window.
Comment 1•21 years ago
|
||
Is this a duplicate of Bug 245051 ?
Reporter | ||
Comment 2•21 years ago
|
||
This is not a duplicate of Bug 245051. I've reproduced it on other machines with
the same browser version.
It's quite easy to reproduce the bug. Just access the attached HTML file from
your HTTP server and follow the instructions.
Reporter | ||
Comment 3•21 years ago
|
||
Comment 4•21 years ago
|
||
O.K. It is very clear that I need to learn more about these useful
sidebar things.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040531
Firefox/0.8.0+
When I use your attached file, I can successfully add the 'Test Bug"
sidebar, and the 'test bug' link in the page produces an alert
saying 'No bug'.
Am I doing something very right? Or very wrong? is this related to the
fact that I do not have a server running on localhost:8080?
Reporter | ||
Comment 5•21 years ago
|
||
I'm not sure if you follow all the steps. If you follow these instructions you
should be able to verify it.
Requirements:
-HTTP Server with the sample file (testbug.html) in some directory.
-Update the "add to sidebar" link to point to the correct place. If you put the
file somewhere else than http://localhost:8080/testbug.html
-Test the bug in the sidebar by pressing "test bug". The testbug.html page
should be open in just the sidebar. Not the main window.
1. Load the file http://localhost:8080/testbug.html in firefox.
2. Click the "add to sidebar" link. This adds the page to your bookmarks.
3. Access the link from the bookmarks menu. This should open the
http://localhost:8080/testbug.html page in the sidebar.
4. The main content area of Firefox should be something else than testbug.html.
The page http://localhost:8080/testbug.html should only be open in the sidebar.
Just go to www.google.com and leave the testbug.html open in the sidebar.
5. Click the "test bug" link. You should see an error in the Javascript console.
This is the bug.
6. Open the http://localhost:8080/testbug.html also in the main window/content
area of Firefox.
7. Press "test bug" in the sidebar again. This should show you a Javascript
prompt. And this verifies that the Javascript in the Sidebar is trying to access
the variable from the main window instead of the sidebar.
(In reply to comment #4)
> O.K. It is very clear that I need to learn more about these useful
> sidebar things.
>
> Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040531
> Firefox/0.8.0+
>
> When I use your attached file, I can successfully add the 'Test Bug"
> sidebar, and the 'test bug' link in the page produces an alert
> saying 'No bug'.
>
> Am I doing something very right? Or very wrong? is this related to the
> fact that I do not have a server running on localhost:8080?
Reporter | ||
Comment 6•21 years ago
|
||
Have you been able to reproduce this bug? I can still reproduce it in Firefox
0.9 on Windows 2000.
(In reply to comment #4)
> O.K. It is very clear that I need to learn more about these useful
> sidebar things.
>
> Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040531
> Firefox/0.8.0+
>
> When I use your attached file, I can successfully add the 'Test Bug"
> sidebar, and the 'test bug' link in the page produces an alert
> saying 'No bug'.
>
> Am I doing something very right? Or very wrong? is this related to the
> fact that I do not have a server running on localhost:8080?
Comment 7•21 years ago
|
||
*** Bug 277951 has been marked as a duplicate of this bug. ***
Comment 8•20 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
This is WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5)
Gecko/20050924 Firefox/1.4
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Comment 10•20 years ago
|
||
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20050822
Firefox/1.6a1
This WFM and I am fairly sure that I found it WFM back in June last year. It would
be good to hear from the reporter to check that we are following his recipe.
Comment 11•20 years ago
|
||
Hi, I once reported this bug (or at least a version of it). I'm now using
Firefox version 1.0.7 and I still have an issue, though it has gotten better.
I open a cnn sidebar in my browser. You can open this url as a sizebar.
http://sidebar.cnn.com/browsers/ns6/cnn.com.expanded.html
A few versions ago, the "more" button (javascript) didn't work. Now it works
great. However, I right-click on a link and try to open it in a new tab and
nothing happens. (I've resorted to opening a tab with Cntl-T and clicking the
link which works fine.) Perhaps this should be reported as a new bug.
Comment 12•20 years ago
|
||
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20050822
Firefox/1.6a1
(In reply to comment #11)
> ... . Now it works
> great. However, I right-click on a link and try to open it in a new tab and
> nothing happens. ...
This WFM. (It might a consequence of the javascript that the site uses to
open link)
Would you care to try in a cuurent build?
You need to log in
before you can comment on or make changes to this bug.
Description
•