File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Changelog
2323--------------------------------------------------------------------------------
2424
2525* Block drag and drop of images, which creates a mess.
26+ * Send sync data when doc blocks receive focus.
2627
2728Version 0.1.41 -- 2025-Nov-17
2829--------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -368,10 +368,14 @@ const on_save = async (only_if_dirty: boolean = false) => {
368368 if ( only_if_dirty && ! is_dirty ) {
369369 return ;
370370 }
371+ clearAutosaveTimer ( ) ;
372+
371373 // <a id="save"></a>Save the provided contents back to the filesystem, by
372374 // sending an update message over the websocket.
373375 const webSocketComm = parent . window . CodeChatEditorFramework . webSocketComm ;
374- console_log ( "CodeChat Editor Client: sent Update - saving document." ) ;
376+ console_log (
377+ "CodeChat Editor Client: sent Update - saving document/updating cursor location." ,
378+ ) ;
375379 await new Promise ( async ( resolve ) => {
376380 webSocketComm . send_message ( { Update : save_lp ( is_dirty ) } , ( ) =>
377381 resolve ( 0 ) ,
Original file line number Diff line number Diff line change @@ -724,6 +724,9 @@ export const DocBlockPlugin = ViewPlugin.fromClass(
724724 }
725725 const [ contents_div , is_tinymce ] = get_contents ( target ) ;
726726
727+ // Send updated cursor/scroll info.
728+ startAutosaveTimer ( ) ;
729+
727730 // See if this is already a TinyMCE instance; if not, move it
728731 // here.
729732 if ( is_tinymce ) {
You can’t perform that action at this time.
0 commit comments