Opened 11 years ago
#11544 new defect
Template is reapplied for new ticket without warning after browser back and forward
Reported by: | Owned by: | Richard Liao | |
---|---|---|---|
Priority: | normal | Component: | TracTicketTemplatePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
I found an annoying problem that seems to be related to the javascript in the TracTicketTemplatePlugin in regards to loading the /newticket page. The template is re-applied when accidentally pressing the browser's BACK then FORWARD buttons while creating a new ticket.
Expected Results
Pressing the browser's BACK then FORWARD buttons should "restore" all form contents in the /newticket form for a new, unsaved ticket.
Actual Results
Pressing the browser's BACK then FORWARD buttons restored MOST of the form contents in the /new ticket form for a new, unsaved ticket. However, the Ticket Description (arguably the most important) was lost. It was replaced with the default template text.
Platform
- Browser: Chrome Version 32.0.1700.107 m
- OS: Windows 7 x64
- Trac: 1.0.1
- Template Plugin: 0.7
Steps to Reproduce
- open /newticket form
- Template for our default type (i.e., "Bug") is populated
- Type in a Summary
- e.g., "Description is lost when pressing BACK button"
- Change Type from "Bug" to "Enhancement"
- Confirm dialog to "Replace ticket content with template?" appears.
- Click OK to replace Description with template for "Enhancement"
- Modify the Ticket Description
- e.g., add some requirements
- Press the browser BACK button
- e.g., accidentally tap the BACK button on your mouse (oops!)
- Panic
- Press the browser FORWARD button
- Summary is restored
- Type is restored (i.e., Enhancement vs default Bug)
- BUG Description is lost, replaced with default template text
Workaround
Confirmed in Chrome on Windows 7:
Pause at above "Panic" step when browser is on previous page (prior to /newticket). Disable javascript, then press browser FORWARD button.