[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:core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Please register or sign in to comment