From b5a2bb9ab347fb5aaa6c6ca95dfd1b31751f1fba Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Thu, 8 Jun 2023 17:52:35 +0900 Subject: [PATCH] Fix strange UI behavior of cancelling dismiss review modal (#25133) Fixes https://github.com/go-gitea/gitea/issues/25130 The old code uses `$(this).next()` to get `dismiss-review-modal`. At first, it will get `$(#dismiss-review-modal)`, but the next time it will get `$(#dismiss-review-modal).next();` and then `$(#dismiss-review-modal).next().next();`. Because div `dismiss-review-modal` will be removed when `dismiss-review-btn` clicked. Maybe the right usage is adding `show-modal` class and `data-modal` attribute. --- templates/repo/issue/view_content/sidebar.tmpl | 4 ++-- web_src/js/features/repo-issue.js | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index ebb844bc003..a053fec0661 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -58,10 +58,10 @@