[BUGFIX] Field Wizards use FormEngine JS functions for has-change checks
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FieldControl / ListModule.php
index 57fc1e2..d1b5fad 100644 (file)
@@ -84,9 +84,10 @@ class ListModule extends AbstractNode
 
         $onClick = [];
         $onClick[] = 'this.blur();';
-        $onClick[] = 'return !TBE_EDITOR.isFormChanged();';
+        $onClick[] = 'return TYPO3.FormEngine.preventFollowLinkIfNotSaved(this.getAttribute(\'href\'));';
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
         $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+
         return [
             'iconIdentifier' => 'actions-system-list-open',
             'title' => $title,