aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-06-08 17:52:35 +0900
committerGitHub <noreply@github.com>2023-06-08 08:52:35 +0000
commitb5a2bb9ab347fb5aaa6c6ca95dfd1b31751f1fba (patch)
treeed441b2c2b854d54797b0113dea0bde54bda6010 /web_src/js
parent679b1f7949aa40d4f962ef27f91b0b384b9c56a5 (diff)
downloadgitea-b5a2bb9ab347fb5aaa6c6ca95dfd1b31751f1fba.tar.gz
gitea-b5a2bb9ab347fb5aaa6c6ca95dfd1b31751f1fba.zip
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.
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/repo-issue.js7
1 files changed, 0 insertions, 7 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index cf6e09472e..175d6b1f59 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -358,13 +358,6 @@ export function initRepoIssueComments() {
).then(() => window.location.reload());
});
- $('.dismiss-review-btn').on('click', function (e) {
- e.preventDefault();
- const $this = $(this);
- const $dismissReviewModal = $this.next();
- $dismissReviewModal.modal('show');
- });
-
$(document).on('click', (event) => {
const urlTarget = $(':target');
if (urlTarget.length === 0) return;