Modify

Opened 8 months ago

#11544 new defect

Template is reapplied for new ticket without warning after browser back and forward

Reported by: brian@… Owned by: richard
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

  1. open /newticket form
    • Template for our default type (i.e., "Bug") is populated
  2. Type in a Summary
    • e.g., "Description is lost when pressing BACK button"
  3. Change Type from "Bug" to "Enhancement"
  4. Confirm dialog to "Replace ticket content with template?" appears.
  5. Click OK to replace Description with template for "Enhancement"
  6. Modify the Ticket Description
    • e.g., add some requirements
  7. Press the browser BACK button
    • e.g., accidentally tap the BACK button on your mouse (oops!)
  8. Panic
  9. 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.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.