@@ -467,28 +467,30 @@ function getReferenceLinkTitleSync(href: string) {
467467 }
468468}
469469
470- // TODO: Check why the event is not supported.
471- //@ts -ignore
472- $ ( document ) . on ( "click" , "a" , goToLink ) ;
473- // TODO: Check why the event is not supported.
474- //@ts -ignore
475- $ ( document ) . on ( "auxclick" , "a" , goToLink ) ; // to handle the middle button
476- // TODO: Check why the event is not supported.
477- //@ts -ignore
478- $ ( document ) . on ( "contextmenu" , "a" , linkContextMenu ) ;
479- // TODO: Check why the event is not supported.
480- //@ts -ignore
481- $ ( document ) . on ( "dblclick" , "a" , goToLink ) ;
482-
483- $ ( document ) . on ( "mousedown" , "a" , ( e ) => {
484- if ( e . which === 2 ) {
485- // prevent paste on middle click
486- // https://github.com/zadam/trilium/issues/2995
487- // https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event#preventing_default_actions
488- e . preventDefault ( ) ;
489- return false ;
490- }
491- } ) ;
470+ if ( glob . device !== "print" ) {
471+ // TODO: Check why the event is not supported.
472+ //@ts -ignore
473+ $ ( document ) . on ( "click" , "a" , goToLink ) ;
474+ // TODO: Check why the event is not supported.
475+ //@ts -ignore
476+ $ ( document ) . on ( "auxclick" , "a" , goToLink ) ; // to handle the middle button
477+ // TODO: Check why the event is not supported.
478+ //@ts -ignore
479+ $ ( document ) . on ( "contextmenu" , "a" , linkContextMenu ) ;
480+ // TODO: Check why the event is not supported.
481+ //@ts -ignore
482+ $ ( document ) . on ( "dblclick" , "a" , goToLink ) ;
483+
484+ $ ( document ) . on ( "mousedown" , "a" , ( e ) => {
485+ if ( e . which === 2 ) {
486+ // prevent paste on middle click
487+ // https://github.com/zadam/trilium/issues/2995
488+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event#preventing_default_actions
489+ e . preventDefault ( ) ;
490+ return false ;
491+ }
492+ } ) ;
493+ }
492494
493495export default {
494496 getNotePathFromUrl,
0 commit comments