mirror of
https://github.com/blueprint-community/extension-pteromonaco.git
synced 2026-02-19 03:41:54 +00:00
Compare commits
7 Commits
2-i-got-th
...
9-bug-mobi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4f66610a4 | ||
|
|
6bc1f8ddb6 | ||
|
|
9c4e19b360 | ||
|
|
00a8d64de0 | ||
|
|
c65ba66980 | ||
| 64faf93a11 | |||
| bec87d1493 |
@@ -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 === 's') {
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') {
|
||||
event.preventDefault();
|
||||
if (action === 'edit') {
|
||||
save();
|
||||
} else if (action === 'new') {
|
||||
setModalVisible(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user