blocking the onunload event in safari breaks back button in ajaxed pages

3 views
Skip to first unread message

daboe01

unread,
Oct 30, 2009, 1:32:25 PM10/30/09
to Prototype & script.aculo.us
hi prototype experts,

in safari (i tested only version 4) page modifications after loading
(e.g. via AJAX) are lost after back-button navigation. this renders my
prototype web-applications ununsable.

when i bump back to version 1.6.0.2 without this line, my app works
fine.

it turned out that the problem is caused by

line 4503 in 1.6.1 (introduced as of version 1.6.0.3):
if (Prototype.Browser.WebKit) window.addEventListener('unload',
Prototype.emptyFunction, false);

what is the intention behind blocking the onunload event in safari?
this seems to do more harm than good from my perspective.
shouldn't we simply eliminate lines 4503 and 4504? or am i missing
something?

sincerely,

daniel
Reply all
Reply to author
Forward
0 new messages