[BUGFIX] Do not drop selection from "singlebox" select 43/43343/3
authorMathias Brodala <mbrodala@pagemachine.de>
Tue, 15 Sep 2015 15:09:05 +0000 (17:09 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Wed, 16 Sep 2015 20:04:55 +0000 (22:04 +0200)
By setting the new value after validation via attribute, we avoid
triggering a new "change" event which in turn causes a validation
again.

Resolves: #69490
Releases: master
Change-Id: I679da7ad7b71048a10a07de1f2d290bfde0dde8b
Reviewed-on: http://review.typo3.org/43343
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Thorsten Bringewatt <t.bringewatt@mittwald.de>
Tested-by: Thorsten Bringewatt <t.bringewatt@mittwald.de>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js

index e6217df..9ce8af0 100644 (file)
@@ -490,7 +490,7 @@ define('TYPO3/CMS/Backend/FormEngineValidation', ['jquery', 'TYPO3/CMS/Backend/F
                        var $field = $(this);
                        var newValue = FormEngineValidation.validateField($field);
                        if (newValue.length && $field.val() !== newValue) {
-                               $field.val(newValue);
+                               $field.attr('value', newValue);
                                FormEngineValidation.setCaretPosition($field, 0);
                        }
                });