From 36ee0745cc8e4083633bdafecbc29441ba55fe18 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Wed, 27 Mar 2024 18:09:34 +0200 Subject: [PATCH] Remove jQuery class from the reaction selector (#30138) - Switched from jQuery class functions to plain JavaScript `classList` - Tested the reaction selector and it works as before Signed-off-by: Yarden Shoham Co-authored-by: Giteabot (cherry picked from commit 1a71dbfb7881f65d39b689a5be26cc94afefb10f) --- web_src/js/features/comp/ReactionSelector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/features/comp/ReactionSelector.js b/web_src/js/features/comp/ReactionSelector.js index fc966c398..2def3db51 100644 --- a/web_src/js/features/comp/ReactionSelector.js +++ b/web_src/js/features/comp/ReactionSelector.js @@ -5,7 +5,7 @@ export function initCompReactionSelector($parent) { $parent.find(`.select-reaction .item.reaction, .comment-reaction-button`).on('click', async function (e) { e.preventDefault(); - if ($(this).hasClass('disabled')) return; + if (this.classList.contains('disabled')) return; const actionUrl = this.closest('[data-action-url]')?.getAttribute('data-action-url'); const reactionContent = this.getAttribute('data-reaction-content');