diff options
author | Gaelian Ditchburn <gaelian.ditchburn@gmail.com> | 2012-06-03 19:07:54 +1000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-05 17:16:22 +0000 |
commit | 7a085dac2a2820856cbe6c2ca8c69779ac766a97 (patch) | |
tree | 4ef96999eb75ab141666feaf19f2e1546e8e1e5f /actionview/test/template | |
parent | 6b548830828e4e910de7854d21717c17303e089c (diff) | |
download | rails-7a085dac2a2820856cbe6c2ca8c69779ac766a97.tar.gz rails-7a085dac2a2820856cbe6c2ca8c69779ac766a97.tar.bz2 rails-7a085dac2a2820856cbe6c2ca8c69779ac766a97.zip |
Switched to use `display:none` in extra_tags_for_form method.
The use of `display:inline` with the content_tag call in the
extra_tags_for_form method potentially causes display issues with some
browsers, namely Internet Explorer. IE's behaviour of not collapsing
the line height on divs with ostensibly no content means that the
automatically added div containing the hidden authenticity_token, utf8
and _method form input tags may interfere with other visible form
elements in certain circumstances. The use of `display:none` rather
than `display:inline` fixes this problem.
Fixes #6403
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index 90f7a412fb..fe82349265 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -3023,7 +3023,7 @@ class FormHelperTest < ActionView::TestCase protected def hidden_fields(method = nil) - txt = %{<div style="margin:0;padding:0;display:inline">} + txt = %{<div style="display:none">} txt << %{<input name="utf8" type="hidden" value="✓" />} if method && !%w(get post).include?(method.to_s) txt << %{<input name="_method" type="hidden" value="#{method}" />} diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 22bf438a56..0d5831dc6f 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -14,7 +14,7 @@ class FormTagHelperTest < ActionView::TestCase method = options[:method] enforce_utf8 = options.fetch(:enforce_utf8, true) - txt = %{<div style="margin:0;padding:0;display:inline">} + txt = %{<div style="display:none">} txt << %{<input name="utf8" type="hidden" value="✓" />} if enforce_utf8 if method && !%w(get post).include?(method.to_s) txt << %{<input name="_method" type="hidden" value="#{method}" />} |