title: bootstrap modal not working when i try to edit one record in firefox
body: <p>I have a form in modal bootstrap where I edit a record. Works fine in chrome browser, but not working in firefox. What happens is that submit does not work in Firefox. Some idea about the problem? Look below parts of the code.</p>
  
  <p>layouts/application.html.erb</p>
  
  <pre><code>(...)
  
  &lt;div class="content"&gt;
      &lt;%= yield %&gt;
  &lt;/div&gt;
  
  (...)
  </code></pre>
  
  <p>photos/index.erb</p>
  
  <pre><code>&lt;h1&gt;Painting Gallery&lt;/h1&gt;
  
  &lt;div id="photos"&gt;
    &lt;%= render @photos %&gt;
  &lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  
  &lt;% if can? :create, @horse.photos.build %&gt;
      &lt;%= form_for([@farm,@horse, @photo], :html =&gt; {:multipart =&gt; true} ) do |f| %&gt;
          &lt;%= f.label :image, "Upload paintings:" %&gt;
          &lt;%= f.file_field :image, multiple: true, name: "photo[image]" %&gt;
          &lt;%= f.submit %&gt;
      &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>_photo.erb</p>
  
  <pre><code>&lt;%= link_to t("photo.edit"), edit_farm_horse_photo_path(@farm.slug,@horse.slug,photo.id), :remote =&gt; true, :data =&gt; {:toggle =&gt; "modal", :target =&gt; "#editPhoto"} %&gt;   
  </code></pre>
  
  <p>_form.erb</p>
  
  <pre><code>&lt;div id="editPhoto" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="editPhotoLabel" aria-hidden="true"&gt;
    &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
      &lt;h3 id="editPhotoLabel"&gt;Editar foto&lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
      &lt;%= form_for([@farm,@horse, @photo], :html =&gt; { :id =&gt; "frmPhoto"},:remote =&gt; true) do |f| %&gt;
        &lt;div class="field"&gt;
          &lt;%= f.label :name %&gt;&lt;br /&gt;
          &lt;%= f.text_field :name %&gt;
        &lt;/div&gt;
        &lt;p&gt;
          &lt;%= f.file_field :image %&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
      &lt;%= f.submit "Salvar" , :id =&gt; "btnEnviar" ,:class =&gt; "btn btn-primary" %&gt;
    &lt;/div&gt;
       &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>edit.js.erb</p>
  
  <pre><code>$(".content").append('&lt;%= escape_javascript(render("photos/form")) %&gt;');
  $("#editPhoto").modal("show");
  </code></pre>
  
  <p>photos_controller.rb</p>
  
  <pre><code>  def edit
      @photo = Photo.find(params[:id])
    end
  
    def update
      respond_to do |format|
        @photo = @horse.photos.find(params[:id])
        if @photo.update_attributes(params[:photo])
          format.js
        else
          render :edit
        end
      end
    end
  </code></pre>
  
  <p>after clicking the edit link the modal appears but when i click on submit button nothing happens. Look the browser response when i click the edit link.</p>
  
  <pre><code>$(".content").append('&lt;div id=\"editPhoto\" class=\"modal hide fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"editPhotoLabel\" aria-hidden=\"true\"&gt;\n  &lt;div class=\"modal-header\"&gt;\n    &lt;button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\"&gt;×&lt;\/button&gt;\n    &lt;h3 id=\"editPhotoLabel\"&gt;Editar foto&lt;\/h3&gt;\n  &lt;\/div&gt;\n  &lt;div class=\"modal-body\"&gt;\n    &lt;form accept-charset=\"UTF-8\" action=\"/criatorio-sagitario/horses/teste--2/photos/9\" class=\"edit_photo\" data-remote=\"true\" enctype=\"multipart/form-data\" id=\"frmPhoto\" method=\"post\"&gt;&lt;div style=\"margin:0;padding:0;display:inline\"&gt;&lt;input name=\"utf8\" type=\"hidden\" value=\"&amp;#x2713;\" /&gt;&lt;input name=\"_method\" type=\"hidden\" value=\"put\" /&gt;&lt;input name=\"authenticity_token\" type=\"hidden\" value=\"jNz2kSH0KXGchNKglmN66Vdd/gyMxyyc9jTT5bf50/w=\" /&gt;&lt;\/div&gt;\n      &lt;div class=\"field\"&gt;\n        &lt;label for=\"photo_name\"&gt;Name&lt;\/label&gt;&lt;br /&gt;\n        &lt;input id=\"photo_name\" name=\"photo[name]\" size=\"30\" type=\"text\" value=\"Original\" /&gt;\n      &lt;\/div&gt;\n      &lt;p&gt;\n        &lt;input id=\"photo_image\" name=\"photo[image]\" type=\"file\" /&gt;\n      &lt;\/p&gt;\n  &lt;\/div&gt;\n  &lt;div class=\"modal-footer\"&gt;\n    &lt;button class=\"btn\" data-dismiss=\"modal\" aria-hidden=\"true\"&gt;Close&lt;\/button&gt;\n    &lt;input class=\"btn btn-primary\" id=\"btnEnviar\" name=\"commit\" type=\"submit\" value=\"Salvar\" /&gt;\n  &lt;\/div&gt;\n&lt;\/form&gt;&lt;\/div&gt;\n\n\n');
  
  $("#editPhoto").modal("show");
  </code></pre>