mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 18:42:28 +08:00
fix(client/ts): dropdowns not working after conversion
This commit is contained in:
parent
be0c80249e
commit
e88cbd5991
@ -1,5 +1,4 @@
|
||||
import dayjs from "dayjs";
|
||||
import { Modal } from "bootstrap";
|
||||
|
||||
function reloadFrontendApp(reason?: string) {
|
||||
if (reason) {
|
||||
@ -205,6 +204,8 @@ function getMimeTypeClass(mime: string) {
|
||||
|
||||
function closeActiveDialog() {
|
||||
if (glob.activeDialog) {
|
||||
// TODO: Fix once we use proper ES imports.
|
||||
//@ts-ignore
|
||||
Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
|
||||
glob.activeDialog = null;
|
||||
}
|
||||
@ -249,6 +250,8 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
|
||||
}
|
||||
|
||||
saveFocusedElement();
|
||||
// TODO: Fix once we use proper ES imports.
|
||||
//@ts-ignore
|
||||
Modal.getOrCreateInstance($dialog[0]).show();
|
||||
|
||||
$dialog.on('hidden.bs.modal', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user