mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 02:19:24 +01:00
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.
This commit is contained in:
parent
f4ce8c73fb
commit
330b166423
@ -552,8 +552,6 @@ export function initRepoIssueReferenceIssue() {
|
|||||||
// Reference issue
|
// Reference issue
|
||||||
$(document).on('click', '.reference-issue', function (event) {
|
$(document).on('click', '.reference-issue', function (event) {
|
||||||
const $this = $(this);
|
const $this = $(this);
|
||||||
$this.closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
|
|
||||||
|
|
||||||
const content = $(`#${$this.data('target')}`).text();
|
const content = $(`#${$this.data('target')}`).text();
|
||||||
const poster = $this.data('poster-username');
|
const poster = $this.data('poster-username');
|
||||||
const reference = $this.data('reference');
|
const reference = $this.data('reference');
|
||||||
|
@ -291,7 +291,6 @@ export function initRepoCommentForm() {
|
|||||||
async function onEditContent(event) {
|
async function onEditContent(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
|
|
||||||
const $segment = $(this).closest('.header').next();
|
const $segment = $(this).closest('.header').next();
|
||||||
const $editContentZone = $segment.find('.edit-content-zone');
|
const $editContentZone = $segment.find('.edit-content-zone');
|
||||||
const $renderContent = $segment.find('.render-content');
|
const $renderContent = $segment.find('.render-content');
|
||||||
@ -584,7 +583,6 @@ function initRepoIssueCommentEdit() {
|
|||||||
|
|
||||||
// Quote reply
|
// Quote reply
|
||||||
$(document).on('click', '.quote-reply', function (event) {
|
$(document).on('click', '.quote-reply', function (event) {
|
||||||
$(this).closest('.dropdown').find('.menu').toggle('visible'); // eslint-disable-line
|
|
||||||
const target = $(this).data('target');
|
const target = $(this).data('target');
|
||||||
const quote = $(`#${target}`).text().replace(/\n/g, '\n> ');
|
const quote = $(`#${target}`).text().replace(/\n/g, '\n> ');
|
||||||
const content = `> ${quote}\n\n`;
|
const content = `> ${quote}\n\n`;
|
||||||
|
Loading…
Reference in New Issue
Block a user