From 1600255c26d985da6187c7fe5fff575db797681a Mon Sep 17 00:00:00 2001 From: JakobDev Date: Tue, 31 Dec 2024 17:24:54 +0100 Subject: [PATCH] Make new table modal work when editing a issue --- web_src/js/features/common-global.js | 2 +- web_src/js/features/repo-legacy.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index 5a304d96f5..b05f6e07fe 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -357,7 +357,7 @@ export function initGlobalLinkActions() { }); } -function initGlobalShowModal() { +export function initGlobalShowModal() { // A ".show-modal" button will show a modal dialog defined by its "data-modal" attribute. // Each "data-modal-{target}" attribute will be filled to target element's value or text-content. // * First, try to query '#target' diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index a4606aa3b5..04b6e93b39 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -29,6 +29,7 @@ import {attachRefIssueContextPopup} from './contextpopup.js'; import {POST, GET} from '../modules/fetch.js'; import {MarkdownQuote} from '@github/quote-selection'; import {toAbsoluteUrl} from '../utils.js'; +import {initGlobalShowModal} from './common-global.js'; const {csrfToken} = window.config; @@ -471,6 +472,8 @@ async function onEditContent(event) { tabEditor?.click(); } + initGlobalShowModal(); + // Show write/preview tab and copy raw content as needed showElem(editContentZone); hideElem(renderContent);