Problem/Motivation

When there are any states on the webform, this will trigger #ajax callbacks on load, causing the house number field to grab focus

Steps to reproduce

Add a condition to a form that has an webform_postcodeapi field and see that the spinner appears on load and that the focus jumps to the house number field

Proposed resolution

Stop the house number from grabbing focus. Might be even better to stop the #ajax from firing at all, but unclear why this is triggered

CommentFileSizeAuthor
#3 3198918-3.patch10.87 KBidebr
#2 3198918-2.patch475 byteslendude

Comments

Lendude created an issue. See original summary.

lendude’s picture

Status: Active » Needs review
StatusFileSize
new475 bytes

This stops the field from grabbing focus when the AJAXing is done

idebr’s picture

StatusFileSize
new10.87 KB

The AJAX change event is still triggered when opening the form. I suggest we use client side change detection instead.

  • c615993 committed on 1.x
    Issue #3198918 by Lendude, idebr: Combining the field with any...
idebr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.