From 7c78941b385336f9f78d21eb7b16a4543f962949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Sat, 27 Sep 2025 06:34:38 +0200 Subject: [PATCH] Allow Dialog to be cleared using the back button --- public/scripts/movim_tpl.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/scripts/movim_tpl.js b/public/scripts/movim_tpl.js index f4393e128..7e0f400d6 100644 --- a/public/scripts/movim_tpl.js +++ b/public/scripts/movim_tpl.js @@ -182,6 +182,11 @@ MovimEvents.registerWindow('loaded', 'movimtpl', () => { }); MovimEvents.registerWindow('popstate', 'movimtpl', (e) => { + if (Dialog.filled()) { + Dialog.clear(); + return; + } + if (MovimTpl.popAnchorKey || e.target.location.hash != '') { MovimTpl.clearAnchorState(); return;