From c42de43dd43e08187efd726fe96d13f4f3ebd319 Mon Sep 17 00:00:00 2001
From: Nikita Hovratov <nikita.h@live.de>
Date: Sun, 18 Jun 2017 23:46:57 +0100
Subject: [PATCH] [BUGFIX] Refresh iconElement after its content has been
 replaced

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/53258
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../backend/Resources/Public/JavaScript/AjaxDataHandler.js       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js b/typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js
index 82e7c6d8ba73..9139034bef89 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js
@@ -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
-- 
GitLab