From 05349e2d94112af1bf648a28cd3ae88819213531 Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:07:16 -0500 Subject: [PATCH] Fix - issue where sidebar observer was not reinitialized on resizing the window (layout changes). --- CharactersPage.js | 5 ++++- abovevtt.css | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CharactersPage.js b/CharactersPage.js index 92c62337b..c9825fca7 100644 --- a/CharactersPage.js +++ b/CharactersPage.js @@ -711,7 +711,9 @@ function convertToRPGRoller(){ }); } - +const debounceObserverSetup = mydebounce(function(){ + observe_character_sheet_changes($('#site-main, .ct-sidebar__portal')); +}, 200); /** actions to take on the character sheet when AboveVTT is NOT running */ async function init_character_sheet_page() { @@ -741,6 +743,7 @@ async function init_character_sheet_page() { // observe window resizing and injeect our join/exit button if necessary window.addEventListener('resize', function(event) { inject_join_exit_abovevtt_button(); + debounceObserverSetup(); }); if(!is_abovevtt_page()){ diff --git a/abovevtt.css b/abovevtt.css index 59aca54e6..c5278faf0 100644 --- a/abovevtt.css +++ b/abovevtt.css @@ -2456,6 +2456,7 @@ body:not(.body-rpgcampaign-details) .sidebar__pane-content { .ct-sidebar__inner [class*='styles_gap']{ border:none; + height:0px; } .avtt-sidebar-controls .tab-btn,