mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Stop polling when an update is pending
This commit is contained in:
parent
dca096b8e3
commit
444c18be34
@ -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"
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user