From cc82932ca7db0b1c549c46765914bfbf44622329 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 20 Oct 2022 17:01:46 +0200 Subject: [PATCH] wait #5544 @1 --- src/resources/views/fields/code.blade.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/resources/views/fields/code.blade.php b/src/resources/views/fields/code.blade.php index 65503a9..02e9356 100644 --- a/src/resources/views/fields/code.blade.php +++ b/src/resources/views/fields/code.blade.php @@ -52,6 +52,9 @@ function initMirrorCode() { $('textarea.code').each(function () { var textarea = $(this); + if (!$(this).is(':visible')) { + return; + } if ($(this).closest('.item.sample').length === 1) { return; } @@ -71,6 +74,12 @@ } initMirrorCode(); + $(window).on("hashchange", function () { + initMirrorCode(); + }); + $(document).on("change", "input[name='current_tab']", function () { + initMirrorCode(); + }); $(document).on('cubist.bunchmultiple.added', function () { initMirrorCode(); }); -- 2.39.5