Skip to content
Snippets Groups Projects
Commit 7a4814c2 authored by Frank Naegler's avatar Frank Naegler Committed by Markus Klein
Browse files

[BUGFIX] Start click binding only after DOM is ready

This patch fixes a loading issue on poor internet connections.
In case of a slow internet connection the icons are not loaded and the
click binding does not work. A DOM ready check should solve the issue.

Resolves: #80416
Releases: master, 7.6
Change-Id: Ia79f14e9dbe0b44a22c5916073b4649211b0bd7b
Reviewed-on: https://review.typo3.org/52136


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarTabea Oertel <tabea.oertel@dkd.de>
Tested-by: default avatarTabea Oertel <tabea.oertel@dkd.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent c21f5715
Branches
Tags
No related merge requests found
......@@ -233,14 +233,18 @@ class SelectSingleElement extends AbstractFormElement
$resultArray['requireJsModules'][] = ['TYPO3/CMS/Backend/FormEngine/Element/SelectSingleElement' => implode(LF, [
'function(SelectSingleElement) {',
'SelectSingleElement.initialize(',
GeneralUtility::quoteJSvalue('#' . $selectId) . ',',
'{',
'onChange: function() {',
implode('', $parameterArray['fieldChangeFunc']),
'}',
'}',
');',
'require([\'jquery\'], function($) {',
'$(function() {',
'SelectSingleElement.initialize(',
GeneralUtility::quoteJSvalue('#' . $selectId) . ',',
'{',
'onChange: function() {',
implode('', $parameterArray['fieldChangeFunc']),
'}',
'}',
');',
'});',
'});',
'}',
])];
......
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