Help us understand the problem. What is going on with this article?

confirmが発生しない条件がある

More than 5 years have passed since last update.

疑問

なぜtableタグで囲むとconfirmが発生しないのかわからなくて困ってます
情報等ありましたらコメントお願いします

confirmが発生しないコード

view_hoge.rb

<table >
    <tr>
    <%= form_tag({:action => :import}, {:multipart => true}) do %>
        <th>入力</th>
        <td>
            <%= file_field_tag :file %>
            <%= submit_tag 'csv', :data => { :confirm => '入力') } %>
        </td>
    <% end %>
    </tr>
</table>

hoge.html

<table >
    <tr>
    <form accept-charset="UTF-8" action="/hoge/import" enctype="multipart/form-data" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="/=" /></div>
        <th>入力</th>
        <td>
            <input id="file" name="file" type="file" />
            <input class="Button" data-confirm="実行しますか?" data-disable-with="処理中..." name="commit" type="submit" value="登録" />
        </td>
    </form> 
    </tr>
</table>

confirmが発生する

view_hoge.rb

<%= form_tag({:action => :import}, {:multipart => true}) do %>
    入力
    <%= file_field_tag :file %>
    <%= submit_tag 'csv', :data => { :confirm => '入力' } %>
<% end %>

hoge.html

<form accept-charset="UTF-8" action="/hoge/import" enctype="multipart/form-data" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="=" /></div>
        <input id="file" name="file" type="file" />
        <input class="Button" data-confirm="実行しますか?" data-disable-with="処理中..." name="commit" type="submit" value="登録" />
</form>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした