mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 21:41:52 +08:00
fix(core): prevent input event propagation (#11307)
### TL;DR Prevent input event of search propagate to editor > CLOSE BS-2832
This commit is contained in:
@@ -360,11 +360,13 @@ export class ChatPanelAddPopover extends SignalWatcher(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _onCompositionEnd(event: CompositionEvent) {
|
private _onCompositionEnd(event: CompositionEvent) {
|
||||||
|
event.stopPropagation();
|
||||||
this._updateQuery((event.target as HTMLInputElement).value.trim());
|
this._updateQuery((event.target as HTMLInputElement).value.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
private _onInput(event: InputEvent) {
|
private _onInput(event: InputEvent) {
|
||||||
if (event.isComposing) return;
|
if (event.isComposing) return;
|
||||||
|
event.stopPropagation();
|
||||||
this._updateQuery((event.target as HTMLInputElement).value.trim());
|
this._updateQuery((event.target as HTMLInputElement).value.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user