robnyman / domassistant

Automatically exported from code.google.com/p/domassistant
1 stars 0 forks source link

Event beforeunload doesn't fire in 2.8 (in IE7 en FF3) #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Try this code with DOMassistant 2.7.4. It alerts a message when the DOM is 
loaded and one message beforeunload.

In IE7 and FF3 DOMassistant 2.8 doesn't alert the message when you try 
close the browser window (= when beforeunload fires). It does fire the 
event in Safari3 and Chrome2

This is the code I'm using:

<html><head><script src="DOMAssistantCompressed-2.8.js" 
type="text/javascript"></script>
<script type="text/javascript">
  DOMAssistant.DOMReady("init()");
  function init() {
    alert('Dom loaded');
    $(window).addEvent("beforeunload", exit);
  }
  function exit(e) {
    return "Trying to leave?";
  }
</script>
</head>
<body>testing</body></html>

Original issue reported on code.google.com by c.wester...@gmail.com on 17 Jul 2009 at 10:35

GoogleCodeExporter commented 9 years ago
Bug confirmed in 2.8 beta 1.

Original comment by chengh...@gmail.com on 20 Jul 2009 at 2:24

GoogleCodeExporter commented 9 years ago
Fixed in trunk.

Original comment by chengh...@gmail.com on 20 Jul 2009 at 7:08

GoogleCodeExporter commented 9 years ago
I verified it on IE7,FF3,Safari3 and Chrome2. Works now.

Original comment by c.wester...@gmail.com on 21 Jul 2009 at 6:42