#10656 closed enhancement (fixed)
Prompt with a warning dialog when navigating away from a page with unsaved changes to an enum list
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | AdminEnumListPlugin |
Severity: | normal | Keywords: | |
Cc: | Jun Omae | Trac Release: |
Description
When items in the list have been reordered, but the changes haven't yet be saved, a warning should be issued when navigating away from the page. As an example, the BacklogPlugin has this behavior.
Attachments (1)
Change History (14)
comment:1 Changed 12 years ago by
Cc: | Jun Omae added; anonymous removed |
---|---|
Owner: | changed from Stepan Riha to Ryan J Ollos |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Summary: | Add a warning when navigating away from a page that has unsaved changes → Prompt with a warning dialog when navigating away from a page with unsaved changes to an enum list |
---|
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
comment:5 follow-up: 6 Changed 12 years ago by
[12419] doesn't seem to be working correctly with Trac 0.11.
Changed 12 years ago by
Attachment: | t10656-beforeunload-jquery1.2-r12424.diff added |
---|
comment:6 follow-up: 7 Changed 12 years ago by
Replying to rjollos:
[12419] doesn't seem to be working correctly with Trac 0.11.
Yes, beforeunload event doesn't work on jQuery 1.2. It works on 1.4. See http://bugs.jquery.com/ticket/4106.
Proposal patch is here, t10656-beforeunload-jquery1.2-r12424.diff. It checks existence of jQuery.event.special.beforeunload
. See http://benalman.com/news/2010/03/jquery-special-events/#version-compatibility and http://docs.jquery.com/Events/jQuery.Event#Special_Events.
comment:7 follow-up: 9 Changed 12 years ago by
Replying to jun66j5:
Proposal patch is here, t10656-beforeunload-jquery1.2-r12424.diff.
Thanks! Supporting these older versions of jQuery is a pain.
I was trying, but could not understand the need for:
$(window).bind('unload', function() { window.onbeforeunload = null; });
Any hints as to why that is needed?
comment:8 Changed 12 years ago by
comment:9 follow-ups: 10 12 Changed 12 years ago by
Replying to rjollos:
I was trying, but could not understand the need for:
$(window).bind('unload', function() { window.onbeforeunload = null; });
This code is avoiding memory leak risk on Internet Explorer.
comment:10 Changed 12 years ago by
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 follow-up: 13 Changed 9 years ago by
Replying to jun66j5:
Replying to rjollos:
I was trying, but could not understand the need for:
$(window).bind('unload', function() { window.onbeforeunload = null; });
This code is avoiding memory leak risk on Internet Explorer.
I'm preparing the code for integration into Trac and trying to determine if this is still needed. Does it apply to all versions of Internet Explorer?
comment:13 Changed 9 years ago by
Replying to rjollos:
Replying to jun66j5:
Replying to rjollos:
I was trying, but could not understand the need for:
$(window).bind('unload', function() { window.onbeforeunload = null; });
This code is avoiding memory leak risk on Internet Explorer.
I'm preparing the code for integration into Trac and trying to determine if this is still needed. Does it apply to all versions of Internet Explorer?
On closer look it appears that is only needed for supporting jQuery < 1.4.
I'd like to prompt with the dialog when Remove selected items is pressed, but not when Apply changes is pressed. I'm currently following the guidance in the first reply here.