File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 33 "description" : " Notebooks UI" ,
44 "license" : " MIT" ,
55 "author" : " dev@holochain.org" ,
6- "version" : " 0.6.6 " ,
6+ "version" : " 0.6.7 " ,
77 "dnaVersion" : " 0.6.0" ,
88 "scripts" : {
99 "start" : " vite --port $UI_PORT --clearScreen false" ,
Original file line number Diff line number Diff line change @@ -146,6 +146,15 @@ export class SynPmEditor extends LitElement {
146146
147147 // Subscribe to Syn changes
148148 this . subscribeToSynChanges ( ) ;
149+
150+ // Listen for scroll events on the ProseMirror DOM to update cursor positions
151+ this . view . dom . addEventListener ( 'scroll' , ( ) => {
152+ this . requestUpdate ( ) ;
153+ } ) ;
154+ // Also listen on the editor container in case scroll happens there
155+ this . editorEl . addEventListener ( 'scroll' , ( ) => {
156+ this . requestUpdate ( ) ;
157+ } ) ;
149158
150159 setTimeout ( ( ) => this . view ?. focus ( ) , 100 ) ;
151160 }
@@ -1276,7 +1285,7 @@ export class SynPmEditor extends LitElement {
12761285 if ( this . _state . value === undefined ) return html `` ;
12771286
12781287 return html `
1279- <div style= "position: relative; overflow: auto; flex: 1; background-color: white; display: flex; flex-direction: column;" >
1288+ <div class = "editor-container" style = "position: relative; overflow: auto; flex: 1; background-color: white; display: flex; flex-direction: column;" >
12801289 <div id= "editor" > </ div>
12811290 ${ Object . entries ( this . _delayedCursors )
12821291 . filter ( ( [ pubKeyB64 , _ ] ) => pubKeyB64 !== encodeHashToBase64 ( this . slice . myPubKey ) )
You can’t perform that action at this time.
0 commit comments