Webform jumps back to previously filled element

Created on 10 July 2024, 6 months ago

If I fill out a autosave form sometimes the webform jumps back to a previously filled form element that is outside of the viewport.

I have a hard time reproducing the exact conditions, but one condition is if I fill out a Textarea and then focus on Details element label by tab control the focus jumps back to the textfield and focus back on it on autosave. This is happening using the adminimal theme.

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany demonde

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

Comments & Activities

  • Issue created by @demonde
  • 🇬🇧United Kingdom rviner

    I confirm this is an issue with focus not remaining on text format fields after autosave.

    For example:

    1. If a form has radio buttons followed by a series of text format fields
    2. Select a radio button, scroll down and start typing in the text format field, after auto save the form focus jumps back to the radio buttons field.

  • 🇬🇧United Kingdom rviner

    Just an update, I'm not sure if this is the right fix but I managed to work around this by removing:

    'focus' on line 91 in webformautosave.js.

    I confirm the webform still autosaves correctly and the for stops auto scrolling.

Production build 0.71.5 2024