mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-22 03:01:07 +00:00
Merge pull request #186 from fyzanshaik/bugfix/github-key-interference
Fix: Disable GitHub shortcuts in text field
This commit is contained in:
commit
d792e300b0
1 changed files with 9 additions and 0 deletions
|
|
@ -131,6 +131,13 @@ export default function ContentApp({
|
|||
});
|
||||
}
|
||||
});
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if (isPopoverOpen) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', handleKeyDown, true);
|
||||
|
||||
const portalDiv = document.createElement("div");
|
||||
portalDiv.id = "popover-portal";
|
||||
|
|
@ -139,6 +146,8 @@ export default function ContentApp({
|
|||
|
||||
return () => {
|
||||
document.removeEventListener("mousemove", () => {});
|
||||
document.removeEventListener('keydown', handleKeyDown, true);
|
||||
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue