mirror of
https://github.com/blueprint-community/extension-pteromonaco.git
synced 2026-02-19 03:41:54 +00:00
Compare commits
1 Commits
3-bug-ctrl
...
4-bug-cont
| Author | SHA1 | Date | |
|---|---|---|---|
| 64faf93a11 |
@@ -360,10 +360,12 @@ const Editor = () => {
|
||||
// Add keyboard shortcut for Ctrl+S (Windows/Linux) and Cmd+S (macOS)
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') {
|
||||
if ((event.ctrlKey || event.metaKey) && event.key === 's') {
|
||||
event.preventDefault();
|
||||
if (action === 'edit') {
|
||||
save();
|
||||
} else if (action === 'new') {
|
||||
setModalVisible(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user