Don't call preventDefault for spaces to prevent browser scrolling

This commit is contained in:
Ben Ogle & Nathan Sobo
2014-06-11 17:16:19 -06:00
parent 1c410cbf5a
commit 4569b76dd5

View File

@@ -403,7 +403,9 @@ EditorComponent = React.createClass
editor.insertText(event.data)
inputNode.value = event.data
event.preventDefault()
# If we prevent the insertion of a space character, then the browser
# interprets the spacebar keypress as a page-down command.
event.preventDefault() unless event.data is ' '
onInputFocused: ->
@setState(focused: true)