[BUGFIX] Correct selection of DOM elements 72/42972/3
authorMarco Dinnbier <m.dinnbier@gmail.com>
Tue, 1 Sep 2015 20:00:09 +0000 (22:00 +0200)
committerNicole Cordes <typo3@cordes.co>
Wed, 9 Sep 2015 22:34:59 +0000 (00:34 +0200)
Fix the selection of DOM elements for using the JQuery
'remove' method.

Resolves: #69417
Releases: master
Change-Id: Ic334c43fb93d42d5a8da7a7d922487f7f196941a
Reviewed-on: http://review.typo3.org/42972
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Andreas Allacher <andreas.allacher@gmx.at>
Tested-by: Andreas Allacher <andreas.allacher@gmx.at>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js

index 43dbe89..c5cb5dd 100644 (file)
@@ -520,8 +520,8 @@ var inline = {
                // cannot be hidden at all (no hidden field)
                if ($formObj.length && $valueObj.length) {
                        hiddenValue = $formObj[0].checked;
-                       $formObj[0].remove();
-                       $valueObj[0].remove();
+                       $formObj.first().remove();
+                       $valueObj.first().remove();
                }
 
                // Update DOM