Hi
This bug:
https://bugs.webkit.org/show_bug.cgi?id=26211
are still present in the just released Chrome beta version 4.1.249.1025
A fix is much wanted.... (this bug is getting quite old now... or?)
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
I am also using Chrome 5.0.342.9 beta. Issue is simple yet annoying.
onbeforeunload event is perfectly
implemented in IE (proprietary) and Firefox. The problem is mainly with
Chrome and Safari (I am using Mac OS
X so not sure if it exists on windows as well or not).
It is possible in IE and FF to simply cancel the page unload by pressing
cancel in the warning dialog which is
generated using returning a string. Chrome and Safari both must be handled
separately within onbeforeunload
event. I create a confirm dialog for both of these browsers and if the user
presses cancel, it must not unload
(return false or ...) however it still does. I don't know but Google has
somewhat similar feature implemented in
Google Docs which works fine there (obviously). Has anyone a workaround ?
I have a parent window button that needs to trigger a onbeforeunload event
in a iFrame.
Working perfectly in IE and FF, but in Chrome it doesn't do anything :(
Has there been any fixes or hacks for this issue?
For me, the event does get fired in 6.0.472.63 when the window is the top
one, but not when inside an iframe.
I have attached two very simple files to test this. When navigating away
from iframe.html, a confirm box is shown, but not when it is iframed inside
outer.html.
Attachments:
onbeforeunloadtest.zip 870 bytes
We need solution for this bug!! We don't want to use IE for our application.
P
The following html works in firefox 3.6.10 but not 6.0.472.63. I'm using
GWT's Window.addWindowClosingHandler, which doesn't work in Chrome either.
<html>
<head>
<script>
function init() {
var iframe = document.getElementById("test_iframe");
iframe.contentWindow.addEventListener("beforeunload", function()
{alert("unloading")}, false);
}
</script>
</head>
<body onload="init()">
<iframe id="test_iframe"></iframe>
</body>
</html>
Wow, I all around LOVE Google, but I must say, for 'this' issue to go on
for 2 years and not as much as a "We're Working On It" disappoints me.
Since this issue has not yet been resolved, I must encourage users to use
browsers I don't use myself outside of developing, as my application(s)
wont properly close in Chrome. Google has how many developers, and not 1
can atleast look into the bug?
Tested right now with the latest stable Chrome (8) and onbeforeunload
simply never fires.
onunload does work, but is too late to be useful in very common scenarios.
The onbeforeunload event works in Chrome beta 9.0.597.47. Hope this
continues working on stable build too.
@ Google Dev: Is the Safari defect
https://bugs.webkit.org/show_bug.cgi?id=19418# the external dependency? It
got resolved recently.
Is the Safari defect https://bugs.webkit.org/show_bug.cgi?id=19418# the
external dependency? It got resolved recently.
This defect blocks us from getting a customer to use Chrome to leverage the
performance benefits!! Could you pay attention to this case?
I'm using the latest version of Google Chrome (11.0.696.60) and I've been
able to replicate this annoying BUG. The bug seems to be fixed for pages
without frames but it still exists if the onbeforeunload is used within a
Frame or an IFrame.
This is a test page:
http://lab.openwebspider.org/ows_lab/chrome_obu_bug/
I have checked in 12.0.742.91 Version of Google Chrome.This Issue still
exists in this version too...
It is still there in v14.0.835.186
I do not understand why the chromium team hasn't got around to solving this
for the last two years. The issue dates back to 2009
I am using
window.onbeforeunload = function () { alert("chrome OnBeforeUnload test"); }
but it is not working in Chrome. It works fine in IE.
I am using Chrome version 14.0.835.202
Still not fixed yet? This is a vital function for many web apps that
perform clean up operations in certain scenarios.
the return 'blahblah' can prompt,and other functions works before the
return with the parameters. Any other scenario will not work.
I think Chrome browser may be close the window too fast and not time to run
the code if there is no popup pause the window closing.
Please fix!!!
Wow I cannot believe this issue has been around for so long..I recently
switched to chrome from Fire Fox and absolutely love it and today I found
this issue which apparently works in all other major browsers..Someone
please fix this bug, we use onbeforeunload in our applications to track
data...
The chrome not support Javascript onunload() and onbeforunload();but
onload() we can used;
So we combine with Cookie can achieve the function what you want to do !
when you open a new page first,it trigger onload();
we use save The url to Cookie , when you refresh in the same page , the
url is equal.
when you jump to other page ,from Javascript get url then url is not equal
the url in cookies
so , you can do what you want to do !
Mail: 3341...@qq.com
Attachments:
onunload().zip 4.5 KB