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

[BUGFIX] Ensure table wizard connected callback has access to textarea

The textarea element needs to be available in the DOM before the table
wizard element is rendered, as the connected callback can be triggered
between the rendering of these distinct elements, which would cause
the initialization to fail.

Resolves: #102748
Related: #102550
Related: #102330
Releases: main, 12.4
Change-Id: I5ad597fb0f64489c0d51a2d3bbc1a71831925061
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82308


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 6af4f29e
No related merge requests found
......@@ -156,7 +156,6 @@ class TextTableElement extends AbstractFormElement
'data-formengine-input-name' => htmlspecialchars($parameterArray['itemFormElName']),
'rows' => (string)$rows,
'wrap' => (string)(($config['wrap'] ?? 'virtual') ?: 'virtual'),
'hidden' => 'true',
],
$this->getOnFieldChangeAttrs('change', $parameterArray['fieldChangeFunc'] ?? [])
);
......@@ -193,10 +192,10 @@ class TextTableElement extends AbstractFormElement
$html[] = $fieldInformationHtml;
$html[] = '<div class="form-control-wrap" style="overflow: auto">';
$html[] = '<div class="form-wizards-wrap">';
$html[] = $this->getTableWizard($attributes['id']);
$html[] = '<div>';
$html[] = '<div hidden>';
$html[] = '<textarea ' . GeneralUtility::implodeAttributes($attributes, true) . '>' . htmlspecialchars($itemValue) . '</textarea>';
$html[] = '</div>';
$html[] = $this->getTableWizard($attributes['id']);
if (!empty($fieldControlHtml)) {
$html[] = '<div class="form-wizards-items-aside form-wizards-items-aside--field-control">';
$html[] = '<div class="btn-group">';
......
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