fix: clicking "enter folder" after creation wasn't working correctly
Massimo Melina committed
Mar 29, 2024 at 21:26 UTC
0dcb754f88e4482e96ca30195f3cf4057bb2b6c1
1 file changed
+2
-2
frontend/src/upload.ts
+2
-2
@@ -448,10 +448,10 @@ async function createFolder() {
448
try {
449
await apiCall('create_folder', { uri, name }, { modal: working })
450
reloadList()
451
- return alertDialog(h(() =>
451
+ await alertDialog(h(() =>
452
h(FlexV, {},
453
h('div', {}, t`Successfully created`),
454
- h(Link, { to: uri + name + '/', onClick() {
454
+ h(Link, { to: uri + name + '/', onClickCapture() { // "capture" because dialogs must be closed (popping from history) before we push a new state in the history
455
closeDialog()
456
closeDialog()
457
} }, t('enter_folder', "Enter the folder")),