mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 21:07:20 +02:00
fix
This commit is contained in:
@@ -162,7 +162,7 @@ export function initTargetButtons(target: ParentNode): void {
|
||||
// There are many "cancel button" elements in modal dialogs, Fomantic UI expects they are button-like elements but never submit a form.
|
||||
// However, Gitea misuses the modal dialog and put the cancel buttons inside forms, so we must prevent the form submission.
|
||||
// There are a few cancel buttons in non-modal forms, and there are some dynamically created forms (eg: the "Edit Issue Content")
|
||||
addDelegatedEventListener(target, 'click', 'form button.ui.cancel.button', (_ /* el */, e) => e.preventDefault());
|
||||
queryElems(target, 'form button.ui.cancel.button', (el) => el.addEventListener('click', (e) => e.preventDefault()));
|
||||
|
||||
queryElems(target, '.show-panel', (el) => el.addEventListener('click', onShowPanelClick));
|
||||
queryElems(target, '.hide-panel', (el) => el.addEventListener('click', onHidePanelClick));
|
||||
|
||||
@@ -37,7 +37,7 @@ async function loadChildren(item, recursive?: boolean) {
|
||||
if (json instanceof Array) {
|
||||
return json.map((i) => ({
|
||||
name: i.name,
|
||||
isFile: i.isFile,
|
||||
type: i.type,
|
||||
path: i.path,
|
||||
children: i.children,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user