Skip to content
Snippets Groups Projects
Commit b179081a authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Avoid autofocus on preselected useOrOverridePlaceholder fields

With #90879 useOrOverridePlaceholder fields have been adapted
to autofocus the related field when the related checkbox
(e.g in sys_file_references) are triggered in
FormEngine.toggleCheckboxField.

This has the side effect that input fields whose checkbox
is preselected are autofocused on initial page load, when
FormEngine.toggleCheckboxField() is called from
FormEngine.initializeNullWithPlaceholderCheckboxes.
This caused the browser to scroll to these fields.

The autofocus is now changed to not be triggered on
initial pageload, only when FormEngine.toggleCheckboxField()
is used due to user input.

This also had the effect that acceptance tests failed randomly as
automated tab-clicks didn't work (for example in #93629), when the
formengine iframe was scrolled all the way to the last
useOrOverridePlaceholder field, rendering the tab-selection invisible.

Releases: main, 11.5
Resolves: #96947
Related: #90879
Related: #93629
Change-Id: Ie880595079e60421556994b14af0b94bba67b73c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73580


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent ee51504c
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment