<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Posts about crossbrowser</title>
    <link>http://wiki.futuretoby.com/tag/crossbrowser</link>
    <language>en-us</language>
    <item>
      <title>Multiple Class Selectors Don't Work in IE6</title>
      <description>This is well-known knowledge, but I since it was not to me, I'll still catalogue it here. When you use a CSS selector with multiple class names on the same element, i.e.:&lt;pre&gt;.class1.class2{&lt;/pre&gt;&lt;pre&gt;   ...&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;div&gt;IE 6 will interpret this as:&lt;/div&gt;&lt;pre&gt;.class2{&lt;/pre&gt;&lt;pre&gt;  ...&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;div&gt;That's right, the first class will get ignored.&lt;/div&gt;</description>
      <pubDate>Wed, 31 Mar 2010 15:53:31 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/Multiple_Class_Selectors_Don%27t_Work_in_IE6</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/Multiple_Class_Selectors_Don%27t_Work_in_IE6</link>
    </item>
    <item>
      <title>JSON with Special Characters fails in IE</title>
      <description>If you try to eval a JSON string that has special characters in it(non-ascii, or chr &amp;gt; 127), it will error out. The other browsers work fine.</description>
      <pubDate>Wed, 27 May 2009 00:09:10 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/JSON_with_Special_Characters_fails_in_IE</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/JSON_with_Special_Characters_fails_in_IE</link>
    </item>
    <item>
      <title>Trying to Index Strings in IE</title>
      <description>&lt;pre&gt;'abc'[0]&lt;br&gt;&lt;/pre&gt;&lt;div&gt;gets you &lt;i&gt;undefined&lt;/i&gt; in IE. The correct way is to do 'abc'.charAt(0).&lt;/div&gt;</description>
      <pubDate>Tue, 26 May 2009 13:57:00 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/Trying_to_Index_Strings_in_IE</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/Trying_to_Index_Strings_in_IE</link>
    </item>
    <item>
      <title>IE Woes: One</title>
      <description>Man! Have I been at war with IE lately. I have been holding back a lot of blog posts related to debug IE problems, and I going to start spewing them out now one by one. For the first installment I'll talk about one I encountered these couple of days...&lt;br&gt;&lt;br&gt;Ever get this IE error?&lt;img src="/uploads/ie_error.png?1228873829" mce_src="/uploads/ie_error.png?1228873829" name="ie_error.png" width="593"&gt;&lt;br&gt;When you click "Ok", this is what you see:&lt;br&gt;&lt;img src="/uploads/ie_error2.png?1228873932" mce_src="/uploads/ie_error2.png?1228873932" name="ie_error2.png" width="522"&gt;&lt;br&gt;Ouch! Can this &lt;i&gt;be&lt;/i&gt; any more catastrophic?(Yeah, that's my Chandler impression.)&lt;br&gt;&lt;br&gt;According to &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2247375&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2247375&amp;amp;SiteID=1"&gt;this forum post&lt;/a&gt;, this happens if you have script tags in your document that's modifying other parts of the dom before the document finishes loading. Umm, okay, but I still had a hard time finding out the exact point this caused the problem. I used the comment-out-code-and-see-if-it-still-breaks-binary-search methodology, and came up with some work arounds which involved delaying the execution of some setup code. But, this catastrophic error came back to haunt be time and time again. Clearly I didn't find the root cause of this error or I wouldn't be committing it repeatedly. &lt;br&gt;&lt;br&gt;But finally, I found it(I think, well at least one of the root causes). I am using &lt;a href="http://getfirebug.com/lite.html" mce_href="http://getfirebug.com/lite.html"&gt;firebug lite&lt;/a&gt; in development, which creates iframes and panels in the pages that pops out and in just like firebug. When you call console.log with firebug lite, guess what happens? Yeah, it modifies the console output window - a part of the dom that is outside of where the script tag is. Got rid of those console.log statements and fixed it.&lt;br&gt;&lt;br&gt;In conclusion, &lt;i&gt;do not&lt;/i&gt; do what I did!&lt;br&gt;</description>
      <pubDate>Tue, 09 Dec 2008 21:09:28 -0600</pubDate>
      <guid>http://wiki.futuretoby.com/IE_Woes%3A_One</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/IE_Woes%3A_One</link>
    </item>
    <item>
      <title>IE getElementById looks up "name"</title>
      <description>IE, &lt;a href="http://www.456bereastreet.com/archive/200802/beware_of_id_and_name_attribute_mixups_when_using_getelementbyid_in_internet_explorer/"&gt;are you kidding me&lt;/a&gt;?&lt;br&gt;</description>
      <pubDate>Tue, 09 Dec 2008 16:29:00 -0600</pubDate>
      <guid>http://wiki.futuretoby.com/IE_getElementById_looks_up_%22name%22</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/IE_getElementById_looks_up_%22name%22</link>
    </item>
    <item>
      <title>Radio button change event firing</title>
      <description>If you register the &lt;i&gt;change &lt;/i&gt;event for a radio button, they fire at different times between IE and FF. FF fires the event immediately when you click on the radio button to change its value. IE does not, it fires &lt;i&gt;changed &lt;/i&gt;only when you &lt;i&gt;blur &lt;/i&gt;the element.&lt;br&gt;</description>
      <pubDate>Mon, 10 Nov 2008 10:54:29 -0600</pubDate>
      <guid>http://wiki.futuretoby.com/Radio_button_change_event_firing</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/Radio_button_change_event_firing</link>
    </item>
    <item>
      <title>IE bug: input endtags show up as nodes</title>
      <description>If you write an input element like this:&lt;span style="font-family: monospace;"&gt;&lt;br&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style="font-family: monospace;"&gt;&amp;lt;input type="text" id="name" name="name" value="&amp;gt;&amp;lt;/input&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: monospace;"&gt;&lt;/span&gt;&lt;/pre&gt;In IE, if you try to traverse the dom, you will get the end-tag as a separate element &lt;font size="2"&gt;&lt;font style="" face="courier new,courier"&gt;/input&lt;/font&gt;&lt;/font&gt;. Ex. with prototype: &lt;font size="2"&gt;&lt;font face="courier new,courier"&gt;$('name').next()&lt;/font&gt;&lt;/font&gt;&lt;font face="#mce_temp_font#"&gt; should get you &lt;font size="2"&gt;&lt;font style="" face="courier new,courier"&gt;/input&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;.&lt;br style=""&gt;</description>
      <pubDate>Mon, 10 Nov 2008 10:50:44 -0600</pubDate>
      <guid>http://wiki.futuretoby.com/IE_bug%3A_input_endtags_show_up_as_nodes</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/IE_bug%3A_input_endtags_show_up_as_nodes</link>
    </item>
    <item>
      <title>button's value attribute</title>
      <description>If you use a button element as a submit button in a form, like:&lt;br&gt;&amp;lt;button id="mybutton"&amp;gt;My Button&amp;lt;/button&amp;gt;&lt;br&gt;$('mybutton').value in FF will get you an empty string whereas in IE you would get "My Button"&lt;br&gt;</description>
      <pubDate>Mon, 29 Sep 2008 16:50:38 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/button%27s_value_attribute</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/button%27s_value_attribute</link>
    </item>
    <item>
      <title>Making justtodolist work for chrome and safari</title>
      <description>Since &lt;a href="/Google_Chrome"&gt;Chrome &lt;/a&gt;is so great, I wanted to use it for all my browser needs. But the apps I've been working on myself have not been targeted for WebKit - the rendering engine used by chrome, and also used my Safari. This is mostly due to laziness on my part - having to handle two browsers at a time is chaos enough. But Safari compatibility is on my todo list for more than one of my projects, and chrome is a good push for this cause. And so I went in today and made &lt;a href="http://justtodolist.appspot.com"&gt;&lt;i&gt;just todo list. &lt;/i&gt;&lt;/a&gt;compatible with Chrome and Safari. The differences I encountered were:&lt;br&gt;&lt;ol&gt;&lt;li&gt;This is really prototype specific - prototype adds an empty underscore parameter for all Ajax request for WebKit browsers. Because apparently, Safari errors out when you try to post with an empty body on XHR calls. And, who knows, this might already be fixed in WebKit. I happened to have code that was not handling this fact on the server side. This was no biggy.&lt;/li&gt;&lt;li&gt;This is an error on my part really, but I had a form with a text input inside. But also registered for the key events on the text input so that when enter is pressed I called form.submit(). The key event code is really unnecessary because an enter on the text input triggers the form submit on both FF and IE. So, although on the other 2 browsers this was no problem, in WebKit this triggers 2 posts. So... just DON'T do this.&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;</description>
      <pubDate>Tue, 02 Sep 2008 23:01:32 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/Making_justtodolist_work_for_chrome_and_safari</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/Making_justtodolist_work_for_chrome_and_safari</link>
    </item>
    <item>
      <title>function dot toString()</title>
      <description>function.toString() has different behavior between IE and FF. FF collapses the parameter list onto one line, while IE leaves it untouched. Ex:&lt;br&gt;&lt;pre&gt;function f(&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param1,&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param2,&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param3){&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; ...&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;pre&gt;&lt;br&gt;f.toString();&lt;/pre&gt;In FF you would get something like: &lt;br&gt;&lt;pre&gt;function(param1, param2, param3){&lt;/pre&gt;&lt;pre&gt;...&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;in IE:&lt;br&gt;&lt;pre&gt;function f(&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param1,&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param2,&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; param3){&lt;/pre&gt;&lt;pre&gt;...&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;br&gt;In IE, this breaks function.argumentNames() in prototype.js, so don't break the parameter list into multiple lines if you are using prototype.js, or until they fix it. Also, notice that FF removes the name of the function in the toString() output.&lt;br&gt;</description>
      <pubDate>Tue, 15 Jul 2008 13:53:38 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/function_dot_toString%28%29</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/function_dot_toString%28%29</link>
    </item>
    <item>
      <title>button element in IE - set type</title>
      <description>If you use the button element, make sure you set the type attribute:&lt;br&gt;&amp;lt;button type="submit"&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br&gt;&lt;br&gt;Otherwise, it won't submit it's parent form when clicked in IE.&lt;br&gt;</description>
      <pubDate>Mon, 30 Jun 2008 14:58:27 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/button_element_in_IE_-_set_type</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/button_element_in_IE_-_set_type</link>
    </item>
    <item>
      <title>prototype descendantsOf works different in FF than IE</title>
      <description>I haven't dug down to the bottom of this but basically Element.descendantOf(elm, ans) gives different results from IE vs FF.&lt;br&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:23:00 -0500</pubDate>
      <guid>http://wiki.futuretoby.com/prototype_descendantsOf_works_different_in_FF_than_IE</guid>
      <author>toby ho</author>
      <link>http://wiki.futuretoby.com/prototype_descendantsOf_works_different_in_FF_than_IE</link>
    </item>
  </channel>
</rss>
