Description
Using Mozilla Firefox with Firebug installed and enabled, having the Firebug option "Break on all errors" enabled.
Navigating away from a page causes Firebug to break javascript execution in the "before_unload" handler, when the following line of code is encountered:
try {return confirmleaving();}
Steps to reproduce
- Install the Firebug extension for Mozilla Firefox, restart Firefox.
Navigate to http://moinmo.in/
Ensure both "Disable Firebug" and "Disable Firebug for moinmo.in" are both not checked in the Tools > Firebug menu.
- Open Firebug from the Firebug menu.
- In the Script tab, under Options, ensure "Break on All Errors" is enabled.
- Navigate to *any* other page, either by clicking an in page link, typing any address into the address bar, selecting a bookmarked page, etc.
Example
Component selection
Details
All MoinMoin Wiki sites, including This Wiki.
Workaround
Discussion
You should test to see if confirmleaving is a function before attempting to call it:
--- common.js 2008-06-30 12:50:38.000000000 +1000 +++ common_fixed.js 2008-06-30 12:50:23.000000000 +1000 @@ -234,8 +234,10 @@ // TODO: Better to set this in the editor html, as it does not make // sense elsehwere. // confirmleaving is available when editing - try {return confirmleaving();} - catch (e) {} + if(typeof(confirmleaving)=="function") { + try {return confirmleaving();} + catch (e) {} + } } // Initialize after loading the page
Plan
- Priority:
- Assigned to:
- Status: