From 42870cf40278e84024ccea41368312451f79a4d6 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Fri, 29 Mar 2024 22:24:17 +0300 Subject: [PATCH] Remove jQuery class from the commit button (#30178) - Switched from jQuery class functions to plain JavaScript `classList` - Tested the commit button disabled toggling functionality and it works as before --------- Signed-off-by: Yarden Shoham Co-authored-by: silverwind Co-authored-by: Giteabot --- web_src/js/features/repo-editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/js/features/repo-editor.js b/web_src/js/features/repo-editor.js index fc951750a96..01dc4b95aaa 100644 --- a/web_src/js/features/repo-editor.js +++ b/web_src/js/features/repo-editor.js @@ -147,8 +147,8 @@ export function initRepoEditor() { silent: true, dirtyClass: dirtyFileClass, fieldSelector: ':input:not(.commit-form-wrapper :input)', - change() { - const dirty = $(this).hasClass(dirtyFileClass); + change($form) { + const dirty = $form[0]?.classList.contains(dirtyFileClass); commitButton.disabled = !dirty; }, });