feat(10-09): add global keydown handler to App.vue — /, Escape, U, N shortcuts live
- Add routeViewRef = ref(null) and bind to <router-view ref="routeViewRef"> - Add onKeydown handler: guards INPUT/TEXTAREA/SELECT/contenteditable; routes / → focusSearch, Escape → clearSearch, U/u → triggerUpload, N/n → startNewFolder - Chain document.addEventListener on onMounted, removeEventListener on onUnmounted - Add double optional chaining (?.) in StorageBrowser.triggerUpload and focusSearch so stubs don't throw in tests - 9 keyboard shortcut tests GREEN; full suite 190 passing 0 failures
This commit is contained in:
@@ -353,8 +353,8 @@ async function submitNewFolder() {
|
||||
|
||||
defineExpose({
|
||||
startNewFolder,
|
||||
triggerUpload: () => dropZoneRef.value?.triggerInput(),
|
||||
focusSearch: () => searchBarRef.value?.focus(),
|
||||
triggerUpload: () => dropZoneRef.value?.triggerInput?.(),
|
||||
focusSearch: () => searchBarRef.value?.focus?.(),
|
||||
clearSearch: () => emit('search-change', ''),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user