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 +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -278,15 +278,20 @@ function goToLinkExt(evt: MouseEvent | JQuery.ClickEvent | JQuery.MouseDownEvent
278278 const { notePath, viewScope } = parseNavigationStateFromUrl ( hrefLink ) ;
279279
280280 const ctrlKey = utils . isCtrlKey ( evt ) ;
281+ const shiftKey = evt . shiftKey ;
281282 const isLeftClick = "which" in evt && evt . which === 1 ;
282283 const isMiddleClick = "which" in evt && evt . which === 2 ;
283284 const targetIsBlank = ( $link ?. attr ( "target" ) === "_blank" ) ;
284285 const openInNewTab = ( isLeftClick && ctrlKey ) || isMiddleClick || targetIsBlank ;
286+ const activate = ( isLeftClick && ctrlKey && shiftKey ) || ( isMiddleClick && shiftKey ) ;
287+ const openInNewWindow = isLeftClick && evt . shiftKey && ! ctrlKey ;
285288
286289 if ( notePath ) {
287- if ( openInNewTab ) {
290+ if ( openInNewWindow ) {
291+ appContext . triggerCommand ( "openInWindow" , { notePath, viewScope } ) ;
292+ } else if ( openInNewTab ) {
288293 appContext . tabManager . openTabWithNoteWithHoisting ( notePath , {
289- activate : evt . shiftKey ? true : targetIsBlank ,
294+ activate : activate ? true : targetIsBlank ,
290295 viewScope
291296 } ) ;
292297 } else if ( isLeftClick ) {
You can’t perform that action at this time.
0 commit comments