Skip to content

Commit 768ca4f

Browse files
authored
Merge pull request #29 from SharinPix/disable-print-shortcut
Disable print keyboard shortcut
2 parents ce113d2 + d8a0b06 commit 768ca4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/pdf_print_service.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ function renderProgress(index, total) {
315315
progressBar.value = progress;
316316
progressPerc.setAttribute("data-l10n-args", JSON.stringify({ progress }));
317317
}
318-
318+
/*
319319
window.addEventListener(
320320
"keydown",
321321
function (event) {
322322
// Intercept Cmd/Ctrl + P in all browsers.
323323
// Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera
324324
if (
325-
event.keyCode === /* P= */ 80 &&
325+
event.keyCode === 80 && // P=
326326
(event.ctrlKey || event.metaKey) &&
327327
!event.altKey &&
328328
(!event.shiftKey || window.chrome || window.opera)
@@ -335,7 +335,7 @@ window.addEventListener(
335335
},
336336
true
337337
);
338-
338+
*/
339339
if ("onbeforeprint" in window) {
340340
// Do not propagate before/afterprint events when they are not triggered
341341
// from within this polyfill. (FF / Chrome 63+).

0 commit comments

Comments
 (0)