From 8551472bf0122720db3ba20e18e997ca7a15ea29 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 1 Jan 2026 13:38:05 +0100 Subject: [PATCH] add workaround for #1147; certain browser-extensions can erroneously unmap modals --- copyparty/web/util.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index a63f25b1..a5e6130b 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -1848,7 +1848,13 @@ var modal = (function () { document.removeEventListener('selectionchange', onselch); document.removeEventListener('focus', onfocus); document.removeEventListener('keydown', onkey); - o.parentNode.removeChild(o); + try { + o.parentNode.removeChild(o); + } + catch (ex) { + if (r.busy) + alert('WARNING: you have a browser-extension which is causing problems'); + } r.busy = false; setTimeout(next, 50); };