       @deactivate()
     else
       @activate()
-      @$input().focus()
 
 
   toggleDeactivate: (e) =>
+    # prevent reactivation if the button is located inside the form
     e.stopPropagation()
     @deactivate()
 

  toggleStick: (stick) =>
    isSticking = @getState('sticking') == '1'

    return if stick == isSticking

    if stick
      @setState 'sticking', '1'
      target = @fixedBar[0]
    else
      @deleteState 'sticking'
      target = @container[0]

    $input = @$input()
    inputFocused = $input.is(':focus')

    target.insertBefore(@box[0], target.firstChild)

    $input.focus() if inputFocused

    @inputChange()
    $input[0].selectionStart = data.length

    @activate()


  deactivate: =>
    @stickyFooter.markerDisable @marker()
    @setState 'active', '0'
    $.publish 'stickyFooter:check'
    @disableFlash()


