Bug Tracker

Modify

Ticket #4418 (closed bug: duplicate)

Opened 5 years ago

Last modified 4 years ago

beforeunload doenst work correctly

Reported by: Jorik Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

$(window).bind("beforeunload") and unbind() does not work correctly. The only way to use it now is good old javascript.

It now only works if you return false in the jquery way:

$(window).bind("beforeunload", function() { return false; })

but this shows the message 'false', and if you return a string the function doenst work anymore.

the way to let is work without jquery:

bind event window.onbeforeunload = function() {

return "Save your data!";

};

unbind the event window.onbeforeunload = null;

Change History

comment:1 Changed 5 years ago by serious

This is a duplicate of #4106 which was re-opened by Brandon.

comment:2 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.