Skip to content

Commit 330b166

Browse files
authored
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.
1 parent f4ce8c7 commit 330b166

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

web_src/js/features/repo-issue.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,6 @@ export function initRepoIssueReferenceIssue() {
552552
// Reference issue
553553
$(document).on('click', '.reference-issue', function (event) {
554554
const $this = $(this);
555-
$this.closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
556-
557555
const content = $(`#${$this.data('target')}`).text();
558556
const poster = $this.data('poster-username');
559557
const reference = $this.data('reference');

web_src/js/features/repo-legacy.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ export function initRepoCommentForm() {
291291
async function onEditContent(event) {
292292
event.preventDefault();
293293

294-
$(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
295294
const $segment = $(this).closest('.header').next();
296295
const $editContentZone = $segment.find('.edit-content-zone');
297296
const $renderContent = $segment.find('.render-content');
@@ -584,7 +583,6 @@ function initRepoIssueCommentEdit() {
584583

585584
// Quote reply
586585
$(document).on('click', '.quote-reply', function (event) {
587-
$(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
588586
const target = $(this).data('target');
589587
const quote = $(`#${target}`).text().replace(/\n/g, '\n> ');
590588
const content = `> ${quote}\n\n`;

0 commit comments

Comments
 (0)