     focus: true
 
   componentWillReceiveProps: ->
-    console.log 'PROPS: ', @props
-    @refs[@props.ref || 'input0'].getDOMNode().focus() if @props.focus
-
     {x,y} = @getPosition @props.subject.data
     @setState
       x: x
       y: y, => @forceUpdate() # updates component position on new subject
+
+  componentWillUpdate: ->
+    # autofocus text input element
+    @refs[@props.ref || 'input0'].getDOMNode().focus() if @props.focus
 
   componentWillUnmount: ->
     tool_config = @toolConfig()

    @props.tool_config ? @props.task.tool_config

  componentDidMount: ->
    # @updatePosition()

    tool_config = @toolConfig()
    if tool_config.suggest == 'common'


    dx = e.pageX - @state.x #Click# - window.scrollX
    dy = e.pageY - @state.y #Click # + window.scrollY

    @setState
      x: dx
