Action buttons unresponsive when coming back from node preview

Created on 12 August 2024, 3 months ago

Problem/Motivation

If this is a known issue I can't find it...

In my testing Chrome behaves fine. Firefox and Safari do not behave as I would expect.

If I click the Preview button from a node/[add|edit] page and then click the browser's Back Button (or equivalent keyboard shortcut) from that Preview page to return to the node/[add|edit] page, both the Save and Preview buttons will be unresponsive.

Oddly, if I navigate to any other page from the node/[add|edit] page, either via a link in browser, bookmark menu item, or manually typing a new address into the address bar and then use the browser's back button from there, the Save and Preview buttons will submit the form as expected.

Steps to reproduce

Standard Drupal install with "Preview before submitting" set to either "Optional" or "Required" for Basic Page
Replicated on Drupal 10.3.2 on simplytest.me (Getting build failures with 11.x there at the moment)
Firefox version 129.0
Safari version 17.6
macOS version 14.6 Sonoma
Also replicated on a co-worker's mac with different specs

Proposed resolution

Considering that Chrome works fine in my testing and that the buttons only appear to break when coming back from this one preview page, I have to believe that this is something that could, and should be fixed in core.

🐛 Bug report
Status

Active

Version

10.3

Component
Node system 

Last updated 2 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ulethjay
  • I was able to reproduce this—once. On subsequent tries the problem didn't occur. That's odd.

  • 🇮🇳India vinmayiswamy

    Hi, I’m able to reproduce this issue across multiple browsers and in a fresh Drupal 10.3.2 installation, following the steps mentioned in the issue summary. Here’s what I found:

    1. The issue occurs consistently in Chrome, Firefox, and Safari in both node edit and node add scenarios.
    2. No JavaScript errors or network issues were observed in developer tools, and there are no relevant entries in the "Recent log messages".

    I’ve attached recordings showing the issue occurring in Chrome, Firefox, and Safari. If there are any further steps we should take or additional information needed, kindly please let me know.

    Thanks!

  • No JavaScript errors or network issues were observed in developer tools

    That got me wondering... If I turn off Javascript in Firefox and then visit the node form, click "Preview", then use the browser's back button, the action buttons retain their functionality.

    On a whim, I've also tried turning off CSS and JS aggregation. Doing so doesn't seem to fix anything. Doesn't hurt to try.

  • 🇺🇸United States mortona2k Seattle

    We have some clients reporting this issue, saying the form was broken.

    If you refresh, the form should keep your input and allow you to save.

    However, if you change your input after previewing/clicking browser back button, then refresh, those will be lost.

    Autocomplete entity reference fields keep their values after refresh, but text input does not.

  • 🇳🇿New Zealand quietone

    Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

Production build 0.71.5 2024