chore(editor): at menu stays open when left right arrow keys are pressed (#10806)

Close [BS-2644](https://linear.app/affine-design/issue/BS-2644/menu-support)
This commit is contained in:
L-Sun committed 2025-03-13 06:14:35 +00:00
1 parent 3db3db0bbc
commit 8ac687628c
3 files changed
+38 -7

No files matched your search

@@ -179,6 +179,14 @@ export class LinkedDocPopover extends SignalWatcher(
createKeydownObserver({
target: eventSource,
signal: keydownObserverAbortController.signal,
interceptor: (event, next) => {
if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
event.preventDefault();
event.stopPropagation();
return;
}
next();
},
onInput: isComposition => {
if (isComposition) {
this._updateLinkedDocGroup().catch(console.error);