昨日書いた、gem serverをIE8から見るとヒドイことになる現象を解決しました。

どうやら、gem serverに問題があるようでした。

gem serverのコード(/usr/lib/ruby/site_ruby/1.8/rubygems/server.rbあたり)を見てみると、

gemのバージョンが1.3.3以降だと、40行目くらいに

   1    SEARCH = <<-SEARCH
   2        <form class="headerSearch" name="headerSearchForm" method="get" action="/rdoc">
   3          <div id="search" style="float:right">
   4            <span>Filter/Search</span>
   5            <input id="q" type="text" style="width:10em" name="q"/>
   6            <button type="submit" style="display:none" />
   7          </div>
   8        </form>
   9    SEARCH

という検索窓をつけるためのHTMLが書かれているところがあります。

これのbuttonタグの書き方がIE8だとうまくいかないらしく(というか、FxとChromeがよきにはからってくれている?)、

   1    SEARCH = <<-SEARCH
   2        <form class="headerSearch" name="headerSearchForm" method="get" action="/rdoc">
   3          <div id="search" style="float:right">
   4            <span>Filter/Search</span>
   5            <input id="q" type="text" style="width:10em" name="q"/>
   6            <button type="submit" style="display:none"></button>
   7          </div>
   8        </form>
   9    SEARCH
</button>できちんと閉じてあげないといけないみたいです。

修正後のgem serverをIE8で見ると、こんな感じです。

ie8_fix.bmp

きちんと表示できるようになって、うれしいです。

普段、全くIE使わないですけど。

posted by Png y_tsuda on Thu 6 Aug 2009 at 05:44
Contents
gem serverをIE8から見るとヒドイことになる現象を解決
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ