This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
apps/client/src/widgets/type_widgets Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ export default class AbstractTextTypeWidget extends TypeWidget {
2020 const isLeftClick = e . which === 1 ;
2121 const isMiddleClick = e . which === 2 ;
2222 const ctrlKey = utils . isCtrlKey ( e ) ;
23+ const activate = ( isLeftClick && ctrlKey && e . shiftKey ) || ( isMiddleClick && e . shiftKey ) ;
2324
2425 if ( ( isLeftClick && ctrlKey ) || isMiddleClick ) {
25- this . openImageInNewTab ( $ ( e . target ) ) ;
26+ this . openImageInNewTab ( $ ( e . target ) , activate ) ;
2627 } else if ( isLeftClick && singleClickOpens ) {
2728 this . openImageInCurrentTab ( $ ( e . target ) ) ;
2829 }
@@ -39,11 +40,11 @@ export default class AbstractTextTypeWidget extends TypeWidget {
3940 }
4041 }
4142
42- async openImageInNewTab ( $img : JQuery < HTMLElement > ) {
43+ async openImageInNewTab ( $img : JQuery < HTMLElement > , activate : boolean = false ) {
4344 const parsedImage = await this . parseFromImage ( $img ) ;
4445
4546 if ( parsedImage ) {
46- appContext . tabManager . openTabWithNoteWithHoisting ( parsedImage . noteId , { viewScope : parsedImage . viewScope } ) ;
47+ appContext . tabManager . openTabWithNoteWithHoisting ( parsedImage . noteId , { activate , viewScope : parsedImage . viewScope } ) ;
4748 } else {
4849 window . open ( $img . prop ( "src" ) , "_blank" ) ;
4950 }
You can’t perform that action at this time.
0 commit comments