Stop polling when an update is pending

This commit is contained in:
Nathan Sobo 2014-07-27 11:34:29 -06:00
parent dca096b8e3
commit 444c18be34
2 changed files with 2 additions and 1 deletions

View File

@ -2007,6 +2007,7 @@ describe "EditorComponent", ->
describe "soft wrapping", ->
beforeEach ->
editor.setSoftWrap(true)
nextAnimationFrame()
it "updates the wrap location when the editor is resized", ->
newHeight = 4 * editor.getLineHeightInPixels() + "px"

View File

@ -766,7 +766,7 @@ EditorComponent = React.createClass
resumeDOMPollingAfterDelay: null # created lazily
pollDOM: ->
return if @domPollingPaused or not @isMounted()
return if @domPollingPaused or @updateRequested or not @isMounted()
wasVisible = @visible
if @visible = @isVisible()