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 @@ -156,10 +156,17 @@ export default function ChatInput({
156
156
enableMentions = { true }
157
157
submitMentionsRef = { submitMentionsRef }
158
158
onChange = { ( input ) => {
159
+ /* BUG: in Markdown mode this stops getting
160
+ called after you paste in an image. It works
161
+ fine in Slate/Text mode. See
162
+ https://github.com/sagemathinc/cocalc/issues/7728
163
+ */
159
164
setInput ( input ) ;
160
165
saveChat ( input ) ;
161
166
} }
162
167
onShiftEnter = { ( input ) => {
168
+ setInput ( input ) ;
169
+ saveChat ( input ) ;
163
170
saveChat . cancel ( ) ;
164
171
on_send ( input ) ;
165
172
} }
Original file line number Diff line number Diff line change @@ -98,12 +98,12 @@ export default function useUpload(
98
98
99
99
return (
100
100
< BlobUpload
101
+ show_upload = { false }
101
102
className = "smc-vfill"
102
103
project_id = { project_id }
103
104
event_handlers = { updloadEventHandlers }
104
105
style = { { height : "100%" , width : "100%" } }
105
106
dropzone_ref = { dropzoneRef }
106
- show_upload = { true }
107
107
>
108
108
{ body }
109
109
</ BlobUpload >
Original file line number Diff line number Diff line change @@ -379,6 +379,7 @@ export abstract class JupyterActions extends Actions<JupyterStoreState> {
379
379
// Set the input of the given cell in the syncdb, which will also change the store.
380
380
// Might throw a CellWriteProtectedException
381
381
public set_cell_input ( id : string , input : string , save = true ) : void {
382
+ if ( ! this . store ) return ;
382
383
if ( this . store . getIn ( [ "cells" , id , "input" ] ) == input ) {
383
384
// nothing changed. Note, I tested doing the above check using
384
385
// both this.syncdb and this.store, and this.store is orders of magnitude faster.
You can’t perform that action at this time.
0 commit comments