[BUGFIX] JS: Fix FormEngine initialization 80/52180/7
authorMarkus Klein <markus.klein@typo3.org>
Mon, 27 Mar 2017 13:51:07 +0000 (15:51 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Wed, 29 Mar 2017 11:14:49 +0000 (13:14 +0200)
commit976934a36c8efde01c31ed38cafec7340562e6f4
treeb11c1c9434589f7a361af3ea17cd5f4c06def6e2
parent4743b9254131fbd3d29b58a2248e7d975f02e144
[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/52180
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Thomas Maroschik <tmaroschik@dfau.de>
Tested-by: Thomas Maroschik <tmaroschik@dfau.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/backend/Resources/Private/TypeScript/FormEngineReview.ts
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineReview.js
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js