         # Give React time to update view without blinking on slow mobile.
         # .active css state is not applied immediately.
         # TODO: Instead of hover or touch-hover, router should control link
-        # active style. 
+        # active style.
         setTimeout =>
           try
             goog.dom.classlist.remove node, 'touch-hover'

goog.provide 'app.react.Gesture'

goog.require 'goog.dom.classlist'

class app.react.Gesture

  ###*
    Helper for github.com/Polymer/polymer-gestures.
    TODO: Move to este-library. Check if tap can safely stop scroll momentum.

    Example:
    {a, span, button} = touch.none 'a', 'span', 'button'

    @param {este.events.RoutingClickHandler} routingClickHandler
    @constructor
    @final

    React.createFactory React.createClass

      render: ->
        props = goog.object.clone @props
        onKeyUp = props.onKeyUp
        props.onKeyUp = (e) =>
          onKeyUp e if onKeyUp
          # Ignore unfocusable tab index.
          return if @getDOMNode().tabIndex == -1
          # Enter/backspace to dispatch tap, because native click is bypassed.
          @onTap e if e.key in ['Enter', ' ']
        React.createElement tag, props

      componentDidMount: ->
        # Undefined at server side, so do nothing.
