aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-02-21 04:44:32 +0800
committerGitHub <noreply@github.com>2023-02-20 14:44:32 -0600
commit330b16642305458339d12222eea2ee9a1bbb3b64 (patch)
treed4d1982cab9895b0ab4920444e4ec10a903abe39 /web_src
parentf4ce8c73fbeadb84daba8c8c68f46f911339b8f8 (diff)
downloadgitea-330b16642305458339d12222eea2ee9a1bbb3b64.tar.gz
gitea-330b16642305458339d12222eea2ee9a1bbb3b64.zip
Remove unnecessary and incorrect `find('.menu').toggle()` (#22987)
Follows: * #22950 The dropdown menu works well without these codes. The reason is that the event bubbling still works for the dropdown menu, the Fomantic UI dropdown menu module will hide the menu correctly if an item is clicked.
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/repo-issue.js2
-rw-r--r--web_src/js/features/repo-legacy.js2
2 files changed, 0 insertions, 4 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index 179ca9b726..7b8705ad2c 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -552,8 +552,6 @@ export function initRepoIssueReferenceIssue() {
// Reference issue
$(document).on('click', '.reference-issue', function (event) {
const $this = $(this);
- $this.closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
-
const content = $(`#${$this.data('target')}`).text();
const poster = $this.data('poster-username');
const reference = $this.data('reference');
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js
index e1dc514320..8178ed6547 100644
--- a/web_src/js/features/repo-legacy.js
+++ b/web_src/js/features/repo-legacy.js
@@ -291,7 +291,6 @@ export function initRepoCommentForm() {
async function onEditContent(event) {
event.preventDefault();
- $(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
const $segment = $(this).closest('.header').next();
const $editContentZone = $segment.find('.edit-content-zone');
const $renderContent = $segment.find('.render-content');
@@ -584,7 +583,6 @@ function initRepoIssueCommentEdit() {
// Quote reply
$(document).on('click', '.quote-reply', function (event) {
- $(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
const target = $(this).data('target');
const quote = $(`#${target}`).text().replace(/\n/g, '\n> ');
const content = `> ${quote}\n\n`;