= 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 == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. Install the Firebug extension for Mozilla Firefox, restart Firefox. 1. Navigate to http://moinmo.in/ 1. Ensure both "Disable Firebug" and "Disable Firebug for moinmo.in" are both not checked in the Tools > Firebug menu. 1. Open Firebug from the Firebug menu. 1. In the Script tab, under Options, ensure "Break on All Errors" is enabled. 1. 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 == ##Add URL that show the bug, screenshot or test wiki markup that fail... ##URL: http://moinmo.in/ ##attachment:screenshot.png == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * http://hg.moinmo.in/moin/1.8/file/tip/wiki/htdocs/common/js/common.js line 237. == Details == All MoinMoin Wiki sites, including This Wiki. == Workaround == ## Either disable Firebug (for all sites), or disable "Break on All Errors" feature. = 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 = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug