[BUGFIX] Refresh iconElement after its content has been replaced 20/54420/2
authorNikita Hovratov <nikita.h@live.de>
Sun, 18 Jun 2017 22:46:57 +0000 (23:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 17 Oct 2017 20:37:17 +0000 (22:37 +0200)
The variable iconElement refers now correctly to the original jQuery
object and is really reverted to the old class as the comment implies.

Resolves: #82624
Releases: master, 8.7
Change-Id: I13615bbee6d5148fe940bac49b72c2766c0a1de7
Reviewed-on: https://review.typo3.org/54420
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js

index 82e7c6d..9139034 100644 (file)
@@ -179,6 +179,7 @@ define(['jquery',
                AjaxDataHandler._call(params).done(function(result) {
                        // revert to the old class
                        Icons.getIcon('actions-edit-delete', Icons.sizes.small).done(function(icon) {
+                               $iconElement = $anchorElement.find(AjaxDataHandler.identifier.icon);
                                $iconElement.replaceWith(icon);
                        });
                        // print messages on errors