[BUGFIX] Don't show "remaining characters" below FlexForms 64/38464/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 3 Apr 2015 15:50:45 +0000 (17:50 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 3 Apr 2015 18:11:49 +0000 (20:11 +0200)
Resolves: #66258
Releases: master
Change-Id: I77c99ca166d19201632d1bf044f71c523658addb
Reviewed-on: http://review.typo3.org/38464
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js

index e3c7fbe..ffe85fe 100644 (file)
@@ -579,7 +579,7 @@ define('TYPO3/CMS/Backend/FormEngine', ['jquery'], function ($) {
                var $maxlengthElements = $('[maxlength]');
                $maxlengthElements.on('focus', function(e) {
                        var $field = $(this),
-                               $parent = $field.parents('.t3js-formengine-field-item'),
+                               $parent = $field.parents('.t3js-formengine-field-item:first'),
                                maxlengthProperties = FormEngine.getCharacterCounterProperties($field);
 
                        // append the counter only at focus to avoid cluttering the DOM
@@ -588,11 +588,11 @@ define('TYPO3/CMS/Backend/FormEngine', ['jquery'], function ($) {
                        ));
                }).on('blur', function() {
                        var $field = $(this),
-                               $parent = $field.parents('.t3js-formengine-field-item');
+                               $parent = $field.parents('.t3js-formengine-field-item:first');
                        $parent.find('.t3js-charcounter').remove();
                }).on('keyup', function() {
                        var $field = $(this),
-                               $parent = $field.parents('.t3js-formengine-field-item'),
+                               $parent = $field.parents('.t3js-formengine-field-item:first'),
                                maxlengthProperties = FormEngine.getCharacterCounterProperties($field);
 
                        // change class and value