mirror of
https://github.com/blueprint-community/extension-pteromonaco.git
synced 2026-02-18 19:41:53 +00:00
Merge pull request #6 from zephrynis/3-bug-ctrls-save-bug
Fix save shortcut to handle uppercase 'S' key
This commit is contained in:
@@ -360,7 +360,7 @@ 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();
|
||||||
|
|||||||
Reference in New Issue
Block a user