0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 11:32:39 +00:00

iframe hotkey printing only works in Edit/Share/New

Default browser printing still works
This commit is contained in:
Trevor Buckner
2024-05-28 12:51:58 -04:00
parent 695b9916dd
commit b4349a0476
4 changed files with 10 additions and 2 deletions

View File

@@ -163,7 +163,7 @@ const BrewRenderer = (props)=>{
const handleControlKeys = (e)=>{
if(!(e.ctrlKey || e.metaKey)) return;
const P_KEY = 80;
if(e.keyCode == P_KEY) printPage();
if(e.keyCode == P_KEY && props.allowPrint) printPage();
if(e.keyCode == P_KEY) {
e.stopPropagation();
e.preventDefault();