File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -67,26 +67,13 @@ export class GitHubPrAppendEnhancer implements CommentEnhancer<GitHubPrAppendSpo
6767 padding : 'var(--base-size-8)' ,
6868 placeholder : 'Add your comment here...' ,
6969 } ) [ 0 ] !
70- console . log ( 'C' )
71- textArea . addEventListener ( 'input' , ( ) => {
70+ const listenForEmpty = new MutationObserver ( ( ) => {
7271 if ( textArea . value === '' ) {
73- console . log ( 'input event fired' )
7472 instance . updatePreview ( )
7573 }
7674 } )
77- const observer = new MutationObserver ( ( ) => {
78- if ( textArea . value === '' ) {
79- console . log ( 'MutationObserver fired' )
80- instance . updatePreview ( )
81- }
82- } )
83- observer . observe ( textArea , { attributes : true , characterData : true } )
84- const cleanup = ( ) => {
85- OverType . instances . delete ( overtypeContainer )
86- ; ( overtypeContainer as any ) . overTypeInstance = undefined
87- }
75+ listenForEmpty . observe ( textArea , { attributes : true , characterData : true } )
8876 return {
89- cleanup,
9077 instance,
9178 }
9279 }
You can’t perform that action at this time.
0 commit comments