Clear cursor blink interval when editor component unmounts

This commit is contained in:
Nathan Sobo
2014-04-16 11:36:16 -06:00
parent febfb120c8
commit d678f367db

View File

@@ -29,6 +29,9 @@ CursorsComponent = React.createClass
@subscribe editor, 'cursors-moved', @pauseCursorBlinking
@startBlinkingCursors()
componentWillUnmount: ->
@stopBlinkingCursors()
startBlinkingCursors: ->
@cursorBlinkIntervalHandle = setInterval(@toggleCursorBlink, @props.cursorBlinkPeriod / 2)