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