From 86530a9e72f32d28ef1971ac9fa705c85b1bd3b6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 8 Oct 2024 16:35:44 +0200 Subject: [PATCH] fix for toc events --- src/wolnelektury/static/js/book_text/references.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wolnelektury/static/js/book_text/references.js b/src/wolnelektury/static/js/book_text/references.js index 1a284a0eb..ef6c51c94 100644 --- a/src/wolnelektury/static/js/book_text/references.js +++ b/src/wolnelektury/static/js/book_text/references.js @@ -606,7 +606,8 @@ $('a.anchor').on('click', function(e) { // Workaround for bad TOC markers. - if (($this).closest('#toc').length) return; + if ($(this).closest('#toc').length) return; + if ($(this).closest('#wltoc').length) return; e.preventDefault(); let sel = window.getSelection(); -- 2.20.1