From b5bb9efc9be040d976ba03bad1848e87308fe461 Mon Sep 17 00:00:00 2001 From: ren <18050944+renintw@users.noreply.github.com> Date: Tue, 17 Oct 2023 03:32:59 +0900 Subject: [PATCH] Add 'auto' condition to toggleOverflowX --- mu-plugins/blocks/query-filter/src/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mu-plugins/blocks/query-filter/src/view.js b/mu-plugins/blocks/query-filter/src/view.js index 969104f62..c89e7ccf4 100644 --- a/mu-plugins/blocks/query-filter/src/view.js +++ b/mu-plugins/blocks/query-filter/src/view.js @@ -31,9 +31,9 @@ function toggleOverflowX() { if ( filtersElement ) { const currentOverflowX = window.getComputedStyle( filtersElement ).overflowX; - if ( currentOverflowX === 'hidden' ) { + if ( 'hidden' === currentOverflowX ) { filtersElement.style.overflowX = 'scroll'; - } else if ( currentOverflowX === 'scroll' ) { + } else if ( 'scroll' === currentOverflowX || 'auto' === currentOverflowX ) { filtersElement.style.overflowX = 'hidden'; } }