refactor(core): [CORE-22] validate compatible core and defer initial layout

This commit is contained in:
Harvey Zhao committed 2026-09-11 23:18:12 +08:00
1 parent 5efc7f7699
commit adec20213f
24 files changed
+77377 -50

No files matched your search

+3 -2
View File
@@ -68,6 +68,8 @@ export function installSettingKeyboard(setting: SettingManager): void {
close()
return
}
if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
return
const row = target.closest<HTMLElement>('.art-setting-item')
if (!row || (target !== row && !target.matches('button,a[href],[role="button"]')))
return
@@ -76,8 +78,7 @@ export function installSettingKeyboard(setting: SettingManager): void {
return
const currentItem = setting.active?.find(item => item.$item === row)
if (!settingScopeActive(settingPanelScope(panel)) || (currentItem && !settingScopeActive(settingScope(currentItem)))) {
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
claimKey(event)
claimKey(event)
return
}
const targets = settingFocusTargets(panel)