From abf3a4ae31fea77285f23c1831fb8c30bb9bbc67 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 6 Sep 2026 16:37:11 +0800 Subject: [PATCH] fix(admin): re-assert [hidden] inside the icon modal so tabs and search switch --- assets/css/admin-icon-picker.css | 6 ++++++ tests/widget-system/icon-picker-contract.test.cjs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/assets/css/admin-icon-picker.css b/assets/css/admin-icon-picker.css index ae6b580b..16f635d4 100644 --- a/assets/css/admin-icon-picker.css +++ b/assets/css/admin-icon-picker.css @@ -13,6 +13,12 @@ justify-content: center; } +/* Tab/search switching toggles the [hidden] attribute, but the explicit + display rules below would beat the UA's [hidden] rule — re-assert it. */ +#aksrt-modal-icon [hidden] { + display: none !important; +} + #aksrt-modal-icon .aksrt-icon-modal__overlay { position: absolute; inset: 0; diff --git a/tests/widget-system/icon-picker-contract.test.cjs b/tests/widget-system/icon-picker-contract.test.cjs index 12697b6d..6e220c64 100644 --- a/tests/widget-system/icon-picker-contract.test.cjs +++ b/tests/widget-system/icon-picker-contract.test.cjs @@ -56,6 +56,10 @@ test('picker JS composes the three value formats and loads the REST catalog', () assert.match(js, /DOMParser/, 'custom SVG is sanitized client side'); const cssPath = 'assets/css/admin-icon-picker.css'; assert.ok(fs.existsSync(path.join(root, cssPath)), 'picker css shipped'); + // Tab/search switching toggles the [hidden] attribute; without this guard + // the explicit display rules on grids/items override it and every group + // stays visible, so the tab bar appears dead. + assert.match(css, /#aksrt-modal-icon \[hidden]\s*\{\s*display:\s*none\s*!important/); }); test('icon values sanitize through the SVG-aware helper on every save path', () => {