javascript - Firefox reloads page even though I press "stay on this page" button -


i using window's onbeforeunload event prevent user leaving page. unfortunately, in firefox, if press f5 refresh page repeatedly, , press "stay on page" button every time, somehow firefox reloads page eventually.

you can try reproduce bug on http://www.grooveshark.com

the interesting thing is, after bug reproduced can see there no content loaded on site (example: grooveshark.com). , after refreshing page again , again content doesn't seem load @ all.

please tell me if you've been able reproduce bug. want know if known issue in firefox , how fix issue.

thanks in advance.

this code:

window.onbeforeunload = function (e) {     var e = e || window.event;     //ie & firefox     if (e) {         e.returnvalue = 'your information has not been saved yet. if leave now, information might lost.';     }     // safari     return 'your information has not been saved yet. if leave now, information might lost.'; }; 

p.s.

video: http://1drv.ms/1cicisx

and thing.

  • insert code in jsfiddle :) hold f5 button , press "stay on page" repeatedly. release f5 , it'll update page.

after reproducing bug steps can't input in jsfiddle input fields.

i filed bug on bugzilla.mozilla.org , got confirmed. it's known issue. here link bug.

https://bugzilla.mozilla.org/show_bug.cgi?id=981574


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -