@@ -90,7 +90,7 @@ export function Code(props: Props) {
9090 let ticking = false
9191 const onScroll = ( ) => {
9292 if ( ! container ) return
93- if ( ctx . file . active ( ) ?. path !== local . path ) return
93+ // if (ctx.file.active()?.path !== local.path) return
9494 if ( ticking ) return
9595 ticking = true
9696 requestAnimationFrame ( ( ) => {
@@ -102,7 +102,7 @@ export function Code(props: Props) {
102102 const onSelectionChange = ( ) => {
103103 if ( ! container ) return
104104 if ( isProgrammaticSelection ) return
105- if ( ctx . file . active ( ) ?. path !== local . path ) return
105+ // if (ctx.file.active()?.path !== local.path) return
106106 const d = getSelectionInContainer ( container )
107107 if ( ! d ) return
108108 const p = ctx . file . node ( local . path ) ?. selection
@@ -112,7 +112,7 @@ export function Code(props: Props) {
112112
113113 const MOD = typeof navigator === "object" && / ( M a c | i P o d | i P h o n e | i P a d ) / . test ( navigator . platform ) ? "Meta" : "Control"
114114 const onKeyDown = ( e : KeyboardEvent ) => {
115- if ( ctx . file . active ( ) ?. path !== local . path ) return
115+ // if (ctx.file.active()?.path !== local.path) return
116116 const ae = document . activeElement as HTMLElement | undefined
117117 const tag = ( ae ?. tagName || "" ) . toLowerCase ( )
118118 const inputFocused = ! ! ae && ( tag === "input" || tag === "textarea" || ae . isContentEditable )
@@ -155,7 +155,7 @@ export function Code(props: Props) {
155155 createEffect ( ( ) => {
156156 const content = html ( )
157157 if ( ! container || ! content ) return
158- if ( ctx . file . active ( ) ?. path !== local . path ) return
158+ // if (ctx.file.active()?.path !== local.path) return
159159 const codeEl = container . querySelector ( "code" ) as HTMLElement | undefined
160160 if ( ! codeEl ) return
161161 const target = ctx . file . node ( local . path ) ?. selection
0 commit comments