Skip to content

Commit

Permalink
Use the defined function
Browse files Browse the repository at this point in the history
  • Loading branch information
okmttdhr committed Dec 15, 2023
1 parent 77e7eae commit 2c07f30
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,7 @@ export const useOverrideSaveButton = ( {
setIsThemeUpgradeModalOpen( true );
}
};
document.addEventListener( 'keydown', ( e: KeyboardEvent ) => {
if ( e.key === 's' && ( e.metaKey || e.ctrlKey ) ) {
e.preventDefault();
e.stopPropagation();
setIsThemeUpgradeModalOpen( true );
}
} );
document.addEventListener( 'keydown', overrideSaveButtonKeyboardShortcut );
return () => {
document.removeEventListener( 'keydown', overrideSaveButtonKeyboardShortcut );
};
Expand Down

0 comments on commit 2c07f30

Please sign in to comment.