Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25833

Unsaved changes are not restored when coming back to the realtime WYSIWYG edit mode with the browser's Back button in Firefox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 16.10.13
    • Realtime
    • None
    • Unknown

    Description

      Steps to reproduce, with Firefox (seen with Firefox 160):

      1. Edit a page with the realtime WYSIWYG editor (standalone edit mode), alone.
      2. Type some text, without saving.
      3. Leave the edit mode by clicking a link (e.g. in the breadcrumb).
      4. Use the browser's Back button to return to the edit mode.

      Expected: the unsaved changes are restored, with the "Unsaved changes restored" notification, like when editing the page again from the view mode.

      Actual: the "Failed to restore unsaved changes" warning is shown, the unsaved changes are not restored, and they are removed from the browser session storage.

      Observations, from a diagnostic functional test on master (19.0.0-SNAPSHOT), with selenium/standalone-firefox:latest:

      • Firefox doesn't keep the edit page in its back/forward cache (pagehide with persisted=false), so the edit page is loaded again from the history (back_forward navigation type), not restored.
      • The unsaved changes are in the session storage when the edit page is left, and the restore is attempted when it is loaded again, but it fails.
      • Editing the page again by opening the edit URL (instead of using Back) restores the unsaved changes as expected (RealtimeWYSIWYGEditorIT#restoreUnsavedChanges).

      Not checked with other browsers going through a full page load on Back (Chrome keeps the page in its back/forward cache, see XWIKI-25826), nor on released versions; the unsaved changes restore was introduced by XWIKI-23141.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: