If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Javascript context lost in sidebar




Bookmarks & History
13 years ago
11 years ago


(Reporter: Olivier OUDIN, Assigned: Vladimir Vukicevic (BM, do not Cc or Request))


1.0 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




(1 attachment)



13 years ago
There is a bug when a page loaded in seidebar uses javascript, it seems that all
javascript objects and functions are lost :

I've a bookmark loaded in the sidebar, which contains custom javascript
functions. In the sidebar theses functions are losts when the page is loaded
(but are ok during loading).

Here is the complete description :

- This page works well when opened with firebox in standard mode

- Bug : if you put this page in your sidebar, it seems that firefox loose all
javascript objects and functions.

This little example reproduce this behaviour
step 1 : we define a function and call it during loading -> it works !
step 2 : we try to do the same things directly without calling our function ->
it works (so javascript still works)
step 3 : we call our function after the page is loaded (with a link) -> It hangs
! The javacript console says our function is not defined.

- More weird now :
step 4 : open the same page in firefox main area (not in sidebar) AND in the
sidebar, and retest calling the function by clicking in the sidebar-> it works !
In fact, le sidebar page uses javascript context defined in the main area page.
We test with more complicated objects, clicking in the sidebar changes the page
in the main area !

Here is the sample to reproduce this always (tested on 1.0PR, 1.0RC1, 1.0RC2 and
1.0)  :

<script language="javascript">
   // We define a little function
   function test(tmpString) {
   // We test our function during page loading
   test('Alert call in function \'test\' during loading');
<!-- link to call our function -->
Alert call in function 'test': <a href="javascript:test('Alert call in function
<!-- a simple javascript test -->
Alert call directly : <a href="javascript:alert('Alert call directly');">test</a>

Comment 1

13 years ago
Created attachment 168777 [details]
Testcase for buf 274744
Links in the sidebar target the main content area, including javascript: links.
Add a target="_self" to your test link, and it works as expected.
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
You need to log in before you can comment on or make changes to this bug.