Opened 7 months ago
Closed 4 months ago
#10656 closed enhancement (fixed)
Prompt with a warning dialog when navigating away from a page with unsaved changes to an enum list
| Reported by: | rjollos | Owned by: | rjollos |
|---|---|---|---|
| Priority: | normal | Component: | AdminEnumListPlugin |
| Severity: | normal | Keywords: | |
| Cc: | jun66j5 | 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 (12)
comment:1 Changed 6 months ago by rjollos
- Cc jun66j5 added
- Owner changed from nonplus to rjollos
- Status changed from new to assigned
comment:2 Changed 6 months ago by rjollos
- Summary changed from Add a warning when navigating away from a page that has unsaved changes to Prompt with a warning dialog when navigating away from a page with unsaved changes to an enum list
comment:3 Changed 6 months ago by rjollos
comment:4 Changed 6 months ago by rjollos
comment:5 follow-up: ↓ 6 Changed 6 months ago by rjollos
[12419] doesn't seem to be working correctly with Trac 0.11.
Changed 6 months ago by jun66j5
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 6 months ago by jun66j5
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 in reply to: ↑ 6 ; follow-up: ↓ 9 Changed 6 months ago by rjollos
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 6 months ago by rjollos
comment:9 in reply to: ↑ 7 ; follow-up: ↓ 10 Changed 6 months ago by 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.
comment:10 in reply to: ↑ 9 Changed 6 months ago by rjollos
comment:11 Changed 4 months ago by rjollos
- Resolution set to fixed
- Status changed from assigned to closed


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.