   displayErrorMessages: (options) ->
     messages = (@errorMessages[error] for error in @errors)
     message = messages.join('<br>')
-    @$button.attr(title: message)
+    @$button.attr('data-original-title': message)
     @$button.tooltip(html: true)
+    @$button.tooltip('enable')
     # Force tooltip display if the user just submitted the form
     @$button.tooltip('show') if options.submit
     @$button.prop('disabled', true)



Stall.onDomReady ->
  $('body').on 'ajax:beforeSend', '[data-add-to-cart-form]', (e) ->
    Stall.AddToCartForm.create($(e.currentTarget))

    @errorMessages = @$el.data('error-messages')

  sendRequest: ->
    unless (v = @validate(submit: true)) and (e = !@errors.length)
      console.log 'sendRequest', v, e
      return false
    @setLoading(true)
    true

