mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 05:32:55 +00:00 
			
		
		
		
	Move handling textChanged to separate macrotask
This commit is contained in:
		@@ -9,7 +9,7 @@
 | 
				
			|||||||
  </button>
 | 
					  </button>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div (textChanged)="saveButtonState = 'DIRTY'"
 | 
					<div (textChanged)="setButtonStateDirty()"
 | 
				
			||||||
  ace-editor
 | 
					  ace-editor
 | 
				
			||||||
  [(text)]="code"
 | 
					  [(text)]="code"
 | 
				
			||||||
  [(mode)]="language"
 | 
					  [(mode)]="language"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,6 +37,10 @@ export class WebideComponent implements OnInit {
 | 
				
			|||||||
    this.requestCode();
 | 
					    this.requestCode();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setButtonStateDirty() {
 | 
				
			||||||
 | 
					    setTimeout(() => {this.saveButtonState = 'DIRTY'; }, 0);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sendCode() {
 | 
					  sendCode() {
 | 
				
			||||||
    this.webSocketService.send(this.anchor_id, {
 | 
					    this.webSocketService.send(this.anchor_id, {
 | 
				
			||||||
      'command': 'write',
 | 
					      'command': 'write',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user