[BUGFIX] JS: Fix FormEngine initialization 08/52208/4
authorMarkus Klein <markus.klein@typo3.org>
Mon, 27 Mar 2017 13:51:07 +0000 (15:51 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 29 Mar 2017 12:39:52 +0000 (14:39 +0200)
commite6b3d3c3ddfbff752426e8002914b14ef2e5893c
tree8419d5d35cdde8a78075be52e5007a0e3c43aafd
parent1c4caf246442c90083cb7e7b5d623dc3f2d3df3e
[BUGFIX] JS: Fix FormEngine initialization

The FormEngine initialization process needs to be very careful
when the DOM is accessed.
This patch separates the routines and encapsulates those in
a DOMready handler, which are critical.

This solves a possible race condition when JS is executed faster
than DOM is built.

Releases: master, 7.6
Resolves: #80481
Resolves: #80366
Change-Id: I205aebc9f87a25f06942f923497f7f535fdb0c8f
Reviewed-on: https://review.typo3.org/52208
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js