#6716 closed bug (invalid)
Jquery 1.3.2 -> 1.4.2 unload event problem
Reported by: | dfsramos | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | jquery unload 1.4.2 | Cc: | |
Blocked by: | Blocking: |
Description
I'm currently developing a webapplication. I was using Jquery 1.3.2 and everything went smoothly. For plugin usage I had to change to version 1.4.2, but when doing so some of the pages on my webapplication somehow caught a problem. When I try to leave them they ALWAYS show the "Are you sure you want to navigate away from this page?" message.
Maybe this isn't quite a bug, but I would like to know which part of the jquery code is doing this so I could try and attempt a fix.
Thanks in advance.
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | leavepagealert.png added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
As documented, the unload events are not supported by jQuery; attach them directly to the window object.
Note: See
TracTickets for help on using
tickets.
Replying to dfsramos:
I kind of solved the problem myself. But I think this shouldn't be quite a solution.
I was binding a function to the $(window).bind("beforeunload"....
And in it I was doing "return true;"
I think jquery was taking "true" as a response and using it to confirm me leaving the page (hence, chrome was alerting "true" instead of the firefox default "Are you sure you want to leave this page").
My solution was removing the "true" and simply do "return;"
But I think this bit of jquery needs a litle tweaking!
Cheers