File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,21 @@ async function onEditContent(event) {
7878
7979 comboMarkdownEditor = getComboMarkdownEditor ( editContentZone . querySelector ( '.combo-markdown-editor' ) ) ;
8080 if ( ! comboMarkdownEditor ) {
81+ const opts = { } ;
82+ opts . onContentChanged = ( editor ) => {
83+ const saveButton = editContentZone . querySelector ( '.ui.primary.button' ) ;
84+ const isUploading = editor . isUploading ( ) ;
85+ if ( saveButton ) {
86+ saveButton . disabled = isUploading ;
87+ }
88+ } ;
89+
8190 editContentZone . innerHTML = document . querySelector ( '#issue-comment-editor-template' ) . innerHTML ;
82- comboMarkdownEditor = await initComboMarkdownEditor ( editContentZone . querySelector ( '.combo-markdown-editor' ) ) ;
91+ comboMarkdownEditor = await initComboMarkdownEditor ( editContentZone . querySelector ( '.combo-markdown-editor' ) , opts ) ;
92+
8393 editContentZone . querySelector ( '.ui.cancel.button' ) . addEventListener ( 'click' , cancelAndReset ) ;
8494 editContentZone . querySelector ( '.ui.primary.button' ) . addEventListener ( 'click' , saveAndRefresh ) ;
95+ opts . onContentChanged ( comboMarkdownEditor ) ;
8596 }
8697
8798 // Show write/preview tab and copy raw content as needed
You can’t perform that action at this time.
0 commit comments