mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Ignore browser key handling for local editable targets
Prevent Browser keyboard capture from preventing chat composer typing when focus is in editable fields (including contenteditable).
This commit is contained in:
parent
9bb3cb9469
commit
96fd5fc2b2
1 changed files with 2 additions and 2 deletions
|
|
@ -1986,6 +1986,7 @@ const model = {
|
|||
},
|
||||
|
||||
handleKeydown(event) {
|
||||
if (isLocalEditableTarget(event?.target)) return;
|
||||
const annotateShortcut = event?.key === "." && (event.metaKey || event.ctrlKey) && !event.altKey;
|
||||
if (annotateShortcut && this._surfaceMounted) {
|
||||
event.preventDefault();
|
||||
|
|
@ -2700,8 +2701,7 @@ const model = {
|
|||
const contextId = this.normalizeContextId(this.activeBrowserContextId || this.contextId);
|
||||
if (!contextId || !this.activeBrowserId) return;
|
||||
if (event.ctrlKey || event.metaKey || event.altKey) return;
|
||||
const editable = ["INPUT", "TEXTAREA", "SELECT"].includes(event.target?.tagName);
|
||||
if (editable) return;
|
||||
if (isLocalEditableTarget(event?.target)) return;
|
||||
event.preventDefault();
|
||||
const printable = event.key && event.key.length === 1;
|
||||
await websocket.emit("browser_viewer_input", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue