fix(admin): re-assert [hidden] inside the icon modal so tabs and search switch

This commit is contained in:
kate522 committed 2026-09-06 16:37:11 +08:00
1 parent 5c226237c0
commit abf3a4ae31
2 files changed
+10

No files matched your search

+6
View File
@@ -13,6 +13,12 @@
justify-content: center; 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 { #aksrt-modal-icon .aksrt-icon-modal__overlay {
position: absolute; position: absolute;
inset: 0; inset: 0;
@@ -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'); assert.match(js, /DOMParser/, 'custom SVG is sanitized client side');
const cssPath = 'assets/css/admin-icon-picker.css'; const cssPath = 'assets/css/admin-icon-picker.css';
assert.ok(fs.existsSync(path.join(root, cssPath)), 'picker css shipped'); 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', () => { test('icon values sanitize through the SVG-aware helper on every save path', () => {