<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>随网之舞Bug</title>
	<atom:link href="http://dancewithnet.com/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://dancewithnet.com</link>
	<description>WEB Design{HTML:CSS:Javascript:DOM:AJAX:PHP:Usability}/Viewpoint/Photo/Food/Mood</description>
	<lastBuildDate>Mon, 18 Jul 2011 02:45:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Vim、Vimperator和一个小bug</title>
		<link>http://dancewithnet.com/2008/07/29/vim-vimperator-bug/</link>
		<comments>http://dancewithnet.com/2008/07/29/vim-vimperator-bug/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 15:52:54 +0000</pubDate>
		<dc:creator>秦歌</dc:creator>
				<category><![CDATA[Javascript & DOM & AJAX]]></category>
		<category><![CDATA[web2.0 & so on]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[Vimperator]]></category>

		<guid isPermaLink="false">http://dancewithnet.com/?p=1348</guid>
		<description><![CDATA[Vim是一个巨牛的编辑器，这是我在经历过Frontpage、Dreamweaver、UltraEdit和Notepad++后的选择，它让我远离让人抓狂的低级的Dreamweaver假死和鼠标给手腕带来的伤痛，剩下的是高效、灵活、强大。了解... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vim.org/">Vim</a>是一个巨牛的编辑器，这是我在经历过Frontpage、Dreamweaver、UltraEdit和Notepad++后的选择，它让我远离让人抓狂的低级的Dreamweaver假死和鼠标给手腕带来的伤痛，剩下的是高效、灵活、强大。了解更多请看<a href="http://blog.sina.com.cn/s/blog_46dac66f010005kw.html">《普通人的编辑利器——Vim》</a>。Vim支持多个平台，有兴趣可以<a href="http://www.vim.org/download.php">去VIM的官方站下载</a>。这里有一些相关资源或许能用到：<span id="more-1348"></span></p>
<ol>
<li><a href="http://dancewithnet.com/resource/2008/vi-vim-cheat-sheet.png">Vi、Vim键盘指令图（可以当作桌面）</a></li>
<li><a href="http://www.liuhuadong.com/archives/68">vim、gvim在windows下中文乱码的终极解决方案</a></li>
<li><a href="http://vimcdoc.sourceforge.net/doc/usr_toc.html">VIM用户手册</a></li>
<li><a href="http://www.gracecode.com/Archive/Display/274">Vim 清单式学习 VI 编辑器</a> </li>
<li><a href="http://www.newsmth.net/att.php?p.731.17628.662.pdf">大家来学VIM</a></li>
<li><a href="http://vcd.gro.clinux.org/">Vim 中文文档</a></li>
</ol>
<p><a href="http://vimperator.mozdev.org/">Vimperator</a>是Firefox上的扩展，使Firefox使用起来像Vim。习惯了Vim的命令，这个扩展使用起来还是蛮爽的。不过发现了一个小bug，影响的不是本身的使用，而是对CSS和JavaScript的呈现，在Firefox3+Vimperator1.1下可以看到这个<a href="http://dancewithnet.com/lab/2008/vimperator-bug/" class="link-btn">bug演示</a>。</p>
<p>ps，今天被这个小bug整的好惨，以后一定要记住在有插件的情况下测试网页首先要排除插件是否产生了影响。</p>
]]></content:encoded>
			<wfw:commentRss>http://dancewithnet.com/2008/07/29/vim-vimperator-bug/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Firefox2中输入框丢失光标bug</title>
		<link>http://dancewithnet.com/2008/03/08/cursor-disappears-in-firefox2/</link>
		<comments>http://dancewithnet.com/2008/03/08/cursor-disappears-in-firefox2/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 15:40:08 +0000</pubDate>
		<dc:creator>秦歌</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Firefox2]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[光标丢失]]></category>

		<guid isPermaLink="false">http://dancewithnet.com/2008/03/08/cursor-disappears-in-firefox2/</guid>
		<description><![CDATA[在Firefox2中某些情况下输入框虽然可以输入，但在获取焦点时没有文本输入光标的显示，这个是非常恶心的bug，非常容易让表单使用者有一种不能输入的错觉，即使后来尝试知道可以输入，但也... ]]></description>
			<content:encoded><![CDATA[<p>在Firefox2中某些情况下输入框虽然可以输入，但在获取焦点时没有文本输入光标的显示，这个是非常恶心的bug，非常容易让表单使用者有一种不能输入的错觉，即使后来尝试知道可以输入，但也无法判断光标定位在哪儿。虽然庆幸的是Firefox3中解决了这个bug，但Firefox3还在beta阶段，取代Firefox2还是需要一些时间的，下面就来仔细说一下这个问题：<span id="more-1271"></span></p>
<h3>一、样式为<code>{position:absolute;}</code>的容器中的表单输入框在样式为类似<code>{overflow:auto;}</code>的容器区域中失去光标</h3>
<p>可以通过<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/" class="link-btn">例一到例六</a>来了解最常见的情况。</p>
<p>如果想整个<code>body</code>都出现失去光标，可以设置<code>html</code>和<code>body</code>两个容器，请看<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/html-body-1.html" class="link-btn">示例</a>。包括举例的<code>overflow:auto</code>在内能引起该Bug的<code>overflow</code>属性共有：</p>
<ol>
<li><code>overflow:auto</code></li>
<li><code>overflow-x:auto;</code></li>
<li><code>overflow-y:auto;</code></li>
<li><code>overflow:scroll;</code></li>
<li><code>overflow-x:scroll;</code></li>
<li><code>overflow-y:scroll;</code></li>
<li><code>overflow-x:hidden;</code></li>
<li><code>overflow-y:hidden;</code></li>
</ol>
<p>除了避免使用<code>overflow</code>属性的其他解决方案：</p>
<ol>
<li>利用<code>overflow:hidden</code>代替产生bug的<code>oveflow</code>属性</li>
<li>在具有上述<code>overflow</code>属性的容器中加入<code>position:relative</code>，请看<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/html-body-2.html" class="link-btn">实例</a>。</li>
<li>在<code>positon:absolute</code>的容器上加入同样的<code>oveflow</code>属性，同时注意在页面出现的顺序，见<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/#demo-4" class="link-btn">例四</a></li>
<li>为使用能产生bug的<code>oveflow</code>属性的容器选择合适的标签，比如<code>fieldset</code>，见<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/#demo-6" class="link-btn">例六</a>。</li>
</ol>
<h3>二、样式为{position:absolute;}的容器中的表单输入框在<code>iframe</code>容器区域中失去光标</h3>
<p>可以通过<a href="http://dancewithnet.com/lab/2008/cursor-disappears-in-firefox2/#demo-7" class="link-btn">例七</a>来了解这个情况。IE6中为了解决下拉列表级别过高问题，往往需要用<code>iframe</code>来遮盖它，偶尔疏忽忘记做浏览器限定就有可能导致上面的问题。</p>
<p>现在看来Firefox2对iframe的处理bug还真不少，比如以前就发现了<a href="http://dancewithnet.com/2007/05/13/iframe-bug-in-firefox-back/">Firefox返回时Iframe的显示Bug</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://dancewithnet.com/2008/03/08/cursor-disappears-in-firefox2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Firefox返回时Iframe的显示Bug</title>
		<link>http://dancewithnet.com/2007/05/13/iframe-bug-in-firefox-back/</link>
		<comments>http://dancewithnet.com/2007/05/13/iframe-bug-in-firefox-back/#comments</comments>
		<pubDate>Sat, 12 May 2007 16:25:06 +0000</pubDate>
		<dc:creator>秦歌</dc:creator>
				<category><![CDATA[Javascript & DOM & AJAX]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iframe]]></category>

		<guid isPermaLink="false">http://dancewithnet.com/2007/05/13/iframe-bug-in-firefox-back/</guid>
		<description><![CDATA[Bug演示
一个页面有4个Iframe来显示flash内容，其中第二个iframe的显示是用Javascript控制的，只有当特定的cookie存在时才出现，否则显示普通的文本。其控制代码是：
&#60;script type=&#34;text/javascript&#34... ]]></description>
			<content:encoded><![CDATA[<h3>Bug演示</h3>
<p>一个页面有4个Iframe来显示flash内容，其中第二个iframe的显示是用Javascript控制的，只有当特定的cookie存在时才出现，否则显示普通的文本。其控制代码是：<span id="more-1013"></span></p>
<pre><code>&lt;script type=&quot;text/javascript&quot;&gt;//&lt;![CDATA[
if(getCookie(&#39;firefoxIframe&#39;)){
document.write(&#39;&lt;p id=&quot;addAd&quot;&gt;&lt;a href=&quot;cookie.html&quot;&gt;点击这里删除这个iframe&lt;/a&gt;&lt;/p&gt;&#39;);
document.write(&#39;&lt;iframe height=&quot;120&quot; width=&quot;300&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot;
frameborder=&quot;0&quot; src=&quot;nAdPre.swf&quot;&gt;&lt;/iframe&gt;&#39;);
}else{
document.write(&#39;&lt;p id=&quot;addAd&quot;&gt;&lt;a href=&quot;cookie.html&quot;&gt;点击这里增加一个iframe&lt;/a&gt;&lt;/p&gt;&#39;);
}
//]]&gt;&lt;/script&gt;</code></pre>
<ol>
<li>打开<a href="/lab/2007/05/iframe-bug-in-firefox-back/" class="link-btn">Bug演示</a>，由于cookie不存在，显示的三个flash都是通过Iframe实现的</li>
<li>点击“点击这里增加一个iframe广告”，跳转到一个新的页面写入名为firefoxIframe的Cookie</li>
<li>点击“返回”或者浏览器的返回按钮，回到Bug演示页面，发现iframe里面的flash错位，<ins datetime="20070514T105240+08:00" title="和RE交流时，发现浏览者可能无法立即察觉出错误现象">即位置2的iframe链接的flash并没有载入，显示的是位置3的flash，位置3的显示的是位置4的flash，位置4的flash却依旧存在</ins>。</li>
<li>关闭标签页(不是关闭整个浏览器，如果关闭整个浏览器Cookie也失效)或新打开一个标签页重新载入该页面，4个Iframe正常显示4个flash</li>
<li>此时如果点击“点击这里删除这个iframe广告”，跳转到新页面删除Cookie，返回也发现Iframe中的flash错位</li>
<li>如果写入Cookie或者删除Cookie时，不通过浏览器的返回，直接通过网址访问，则不会出现错位</li>
</ol>
<h3>简单分析和解决方案</h3>
<p>似乎Firefox返回时，Javascript重新执行了，但是Iframe并未依据src属性重新载入，而是给Iframe和src以类似编号似的配对，而由于返回时Javascript的执行，导致Iframe多了一个（或少了一个），这就导致后面的配对错位。</p>
<p>以上仅为猜测，但这的确是Firefox（2.0.0.3）的一个bug，IE返回时Javascript重新执行，并且Iframe的依据src重新载入，Opera返回时Javascript不重新执行，页面没有变化。</p>
<p>解决方案是在文本中增加一个隐藏的Iframe来占位，上面代码修改如下代码如下：</p>
<pre><code>document.write(&#39;&lt;p id=&quot;addAd&quot;&gt;&lt;a href=&quot;cookie.html&quot;&gt;点击这里增加一个iframe&lt;/a&gt;&lt;/p&gt;&#39;);
<span>//把上面的代码修改成为</span>
document.write(&#39;&lt;iframe src=&quot;#&quot; style=&quot;display:none;&quot;&gt;&lt;/iframe&gt;&#39;);
document.write(&#39;&lt;p id=&quot;addAd&quot;&gt;&lt;a href=&quot;cookie.html&quot;&gt;点击这里增加一个iframe&lt;/a&gt;&lt;/p&gt;&#39;);</code></pre>
<p>请看<a href="/lab/2007/05/iframe-bug-in-firefox-back/fixed.html" class="link-btn">修改后的演示</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://dancewithnet.com/2007/05/13/iframe-bug-in-firefox-back/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>微软的便便</title>
		<link>http://dancewithnet.com/2006/03/31/microsoft-bugs/</link>
		<comments>http://dancewithnet.com/2006/03/31/microsoft-bugs/#comments</comments>
		<pubDate>Thu, 30 Mar 2006 16:27:00 +0000</pubDate>
		<dc:creator>秦歌</dc:creator>
				<category><![CDATA[互联网 & IT]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://dancewithnet.com/?p=231</guid>
		<description><![CDATA[微软最近够郁闷了，开发了5年、耗资60亿美元、达到5000万行的发现数万漏洞的Vista宣布延期推出，一片哗然，甚至出现了报道说有微软的员工说如果此事追究责任CEO应该辞职。但是不管微软的... ]]></description>
			<content:encoded><![CDATA[<p>微软最近够郁闷了，开发了5年、耗资60亿美元、达到5000万行的发现数万漏洞的Vista宣布延期推出，一片哗然，甚至出现了报道说有微软的员工说如果此事追究责任CEO应该辞职。但是不管微软的操作系统如何，但是构建了大多数人的电子信息世界的基础，只能打着补丁用着现有的等着未来的。同样糟糕的还有IE，IE最大的特色就是莫名其妙，莫名奇妙的HTML和CSS解析，莫名奇妙的JS错误提示，还有更多的莫名奇妙的编译事件，<span id="more-231"></span>比如说今天，我帮小四同学找IE6.0的下载地址，肯定要去microsoft.com这个全世界流量最大的公司网站了，谁知道打开首页就晕了，怎么微软公司的首页也会出现用老外的话说shit的事情呢？三个广告图片两个图片不显示，刷新几次都如此，晕到。我截了一个图，准备发给bill gates，然后继续工作。<br /><img src='http://dancewithnet.com/wp-content/uploads/2007/03/microsoft-homepage-1.jpg' alt='Microsoft的首页在IE下出问题' /></p>
<p>下午的时候，又帮助另外一个朋友下载IE，突然发现，三个广告图片，两个不显示的显示了，显示的不显示了，刷新依然。<br /><img src='http://dancewithnet.com/wp-content/uploads/2007/03/microsoft-homepage-2.jpg' alt='Microsoft的首页在IE下出问题' /></p>
<p>我就感觉很奇怪了，用Firefox、IE5.5和IE5.0都没有问题，IE6.0下就是有问题，而我的IE6又没有问题，或许这就是所谓的灵异时间吧。操作系统，可能对很多人来讲都不好选择，除了微软，别无分店，但是浏览器还有Firefox，还有Opera，自从Opera免费推出8.0开始，我就一直使用，蛮喜欢的，虽然在某些js下不是特别稳定，但是还是强烈推荐大家使用了，用就用8.5了，这年头还有谁去用6z用的那个7.5呢？IE7.0的beta对CSS2.0的支持，不比6.0强多少，修正了一些bug，最终发布我能期望更多嘛？更不要奢求SVG和E4X的支持了。</p>
]]></content:encoded>
			<wfw:commentRss>http://dancewithnet.com/2006/03/31/microsoft-bugs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

