From: Richard Fairhurst Date: Fri, 18 Jan 2008 16:39:10 +0000 (+0000) Subject: maybe this will work X-Git-Tag: live~8057 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b387800234e8e1d019ba7488af3ae169c5ba5525?hp=9a57f4a12510df05369c4086afa80b7049d2d4cb maybe this will work --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index c5d40d9a8..fa693051b 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -48,10 +48,11 @@ var brokenContentSize = $("content").offsetWidth == 0; var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF"); var changesaved = true; - + var winie=false; if (document.all && window.print) { winie=true; } + window.onbeforeunload=function() { - if (!changesaved) { - return "You have unsaved changes. (To save in Potlatch, you should deselect the current way or point.)"; + if (!changesaved && !winie) { + return "You have unsaved changes. (To save in Potlatch, you should deselect the current way or point.)"; } }