Ticket #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: | |
| Blocking: | Blocked by: |
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
Change History
comment:1 in reply to: ↑ description Changed 3 years ago by dfsramos
Replying to dfsramos:
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.
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

