Eliminate unnecessary setTimeout function from CKEditor's class, since it is no longer needed
This commit is contained in:
		
							
								
								
									
										18
									
								
								service2.js
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								service2.js
									
									
									
									
									
								
							@@ -812,18 +812,12 @@ class BesCKService extends BesTreeService {
 | 
				
			|||||||
      this.clearProofing(domElement)
 | 
					      this.clearProofing(domElement)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO: Research if input event or any other event that is called *after* the change is completed
 | 
					    this.repositionAllMarkup()
 | 
				
			||||||
    // is possible with CKEditor, and move the code below this line there.
 | 
					    // Defer grammar-checking to reduce stress on grammar-checking server.
 | 
				
			||||||
    setTimeout(() => {
 | 
					    this.timer = setTimeout(() => {
 | 
				
			||||||
      // Now that the text is done changing, we can correctly calculate markup position.
 | 
					      this.proofAll()
 | 
				
			||||||
      this.repositionAllMarkup()
 | 
					      delete this.timer
 | 
				
			||||||
 | 
					    }, 1000)
 | 
				
			||||||
      // Defer grammar-checking to reduce stress on grammar-checking server.
 | 
					 | 
				
			||||||
      this.timer = setTimeout(() => {
 | 
					 | 
				
			||||||
        this.proofAll()
 | 
					 | 
				
			||||||
        delete this.timer
 | 
					 | 
				
			||||||
      }, 1000)
 | 
					 | 
				
			||||||
    }, 0)
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user