WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

#1380 closed defect (duplicate)

Lost text without warning when click link in Trac without JavaScript enabled

Reported by: pdfernhout Owned by:
Milestone: Priority: normal
Component: Trac Keywords:
Cc:

Description

Expected Behavior: When JavaScript is not enabled, Trac should always either open links supplied by Trac in new pages, or Trac should preserve entered text when a user clicks the the back button after viewing a link supplied by Trac.

Observed behavior: If you do not have JavaScript enabled for the Trac page (like when using NoScript with FireFox), and enter a new issue in Trac, or enter an update an existing issue, and then click the Wiki Formatting link, you will proceed to that Wiki Formatting page, and when you press the back button, your entered text will be gone. That happened to me after entering the text for my first WordPress bug report when I was almost finished and I went to check a formatting issue. :-(

If you have JavaScript enabled, when you click the Wiki Formatting link (or presumably other links, but I have not tested them), you will instead receive a warning about possible data loss and will be asked to confirm you want to leave the page. That works well, but not everyone has JavaScript enabled everywhere. Trac seems to otherwise work without JavaScript.

The same issue applies for other links on that page. Of those, the search, contributor handbook, and Trac Tickets links are probably the most likely to be clicked on when working on a new ticket and thus lead to lost text.

I have only tested this in FireFox with NoScript, but I assume other browsers would act the same way without JavaScript enabled.

Possible solutions: I don't know the best way to deal with the issue, but one possibility is to open all of those links in new browser pages (at least when JavaScript is not enabled). That is probably the easiest fix. When JavaScript is enabled, those links could be rewritten to open in the same page if preserving the current behavior under JavaScript was desirable. Alternatively, Trac could require JavaScript to be enabled to use it, but that does not feel like a good choice to me for just this one issue given the previous option. Or, as another possibility, there may be something which could be changed that Trac is currently doing to reset the entered text or cause a page reload when re-visiting the page by using the back button; it is otherwise common to go back to a page with entered text in FireFox and have the entered text still be there.

Change History (1)

#1 @pdfernhout
4 years ago

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

Duplicate of #1379.

Sorry this got entered twice. Trac threw up a Python error when I submitted it the first time and I just assumed it was not stored.

  File "/home/trac/resources/templates/site.html", line 10, in <Suite u"scripts_version = '53' ...">
    is_bug_gardener = 'TICKET_EDIT_DESCRIPTION' in perm(resource)
AttributeError: 'dict' object has no attribute 'name'

That issue seems to have been fixed since.

Note: See TracTickets for help on using tickets.