Skip to content

Commit

Permalink
Remove jQuery class from the reaction selector (#30138)
Browse files Browse the repository at this point in the history
- Switched from jQuery class functions to plain JavaScript `classList`
- Tested the reaction selector and it works as before

Signed-off-by: Yarden Shoham <[email protected]>
Co-authored-by: Giteabot <[email protected]>
  • Loading branch information
yardenshoham and GiteaBot authored Mar 27, 2024
1 parent 34acd8e commit 1a71dbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/features/comp/ReactionSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 1a71dbf

Please sign in to comment.