<?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>Robertdot, A Web Design Blog &#187; Bugs</title>
	<atom:link href="http://robertdot.org/tags/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertdot.org</link>
	<description>A web design blog for designers that develop or developers that design.</description>
	<lastBuildDate>Tue, 25 Jan 2011 20:43:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adobe Contribute CS5 Repeatable Regions Broken On Edit</title>
		<link>http://robertdot.org/2011/01/25/adobe-contribute-cs5-repeatable-regions-broken-on-edit/</link>
		<comments>http://robertdot.org/2011/01/25/adobe-contribute-cs5-repeatable-regions-broken-on-edit/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 20:43:41 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Contribute]]></category>

		<guid isPermaLink="false">http://robertdot.org/?p=197</guid>
		<description><![CDATA[I&#8217;ve been working on some Contribute templates for a client.  I noticed that repeatable regions weren&#8217;t working right.  Instead of adding a new item to the region when clicking the plus (or deleting when clicking the minus), the &#8220;cursor&#8221; would simply move to the next item.  The only other reference I could [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some Contribute templates for a client.  I noticed that repeatable regions weren&#8217;t working right.  Instead of adding a new item to the region when clicking the plus (or deleting when clicking the minus), the &#8220;cursor&#8221; would simply move to the next item.  The only other reference I could find to the problem was <a href="http://www.justskins.com/forums/contribute-repeating-region-glitches-53732.html">some random, unresolved thread on some website I&#8217;ve never heard of</a>.</p>
<p>After a lot of digging around in the code, I figured out the problem.  If your template includes another file that has repeatable regions, the repeatable regions in your main template will stop working when you edit the page again.  As described, the cursor will move up and down the existing regions instead of adding new regions.</p>
<p>For example, I have a navigation template that has repeatable regions.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="htmlstrict" style="font-family:monospace;">&lt;ul id=&quot;nav&quot;&gt;
&lt;!-- TemplateBeginRepeat name=&quot;Navigation&quot; --&gt; 
&lt;li&gt;&lt;!-- TemplateBeginEditable name=&quot;Nav Item&quot; --&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;!-- TemplateEndEditable --&gt;&lt;/li&gt;
&lt;!-- TemplateEndRepeat --&gt; 
&lt;/ul&gt;</pre></td></tr></table></div>

<p>I included that file via the standard PHP include <code><?php include "nav.php" ?></code>.  When editing, Contribute seemed to get confused about the repeatable regions in the navigation when Contribute manually imported the navigation file.</p>
<p>The fix is either to not use repeatable regions in your include files (not an option) or to trick Contribute into not trying to include the included file.  Contribute is at least smart enough to know how to do the standard PHP includes.  So, I had to break a rule and use <code>eval</code> like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;include('./nav.php');&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>PHP <code>eval</code>s the string and ultimately includes the file.  Contribute doesn&#8217;t understand the code and does nothing, which removes the problematic code and causes repeatable regions to work as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertdot.org/2011/01/25/adobe-contribute-cs5-repeatable-regions-broken-on-edit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 7 Heading Bug</title>
		<link>http://robertdot.org/2007/04/05/internet-explorer-7-heading-bug/</link>
		<comments>http://robertdot.org/2007/04/05/internet-explorer-7-heading-bug/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 10:25:41 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://robertdot.org/2007/04/05/internet-explorer-7-heading-bug/</guid>
		<description><![CDATA[
 I try to avoid Internet Explorer 7, or IE7 for short, but I can&#8217;t any more.  Today was the first time I really had to debug in IE7 and I discovered a pretty irritating bug.


 What I wanted to do was put a h2 inside of a div and adjust the margin-top so [...]]]></description>
			<content:encoded><![CDATA[<p>
 I try to avoid Internet Explorer 7, or IE7 for short, but I can&#8217;t any more.  Today was the first time I really had to debug in IE7 and I discovered a pretty irritating <q>bug.</q>
</p>
<p>
 What I wanted to do was put a <code>h2</code> inside of a <code>div</code> and adjust the <code>margin-top</code> so that it was hanging over the top edge of the <code>div</code>.  Imagine a <code>fieldset</code> with a <code>legend</code>.
</p>
<p>
 My code and style sheet were something like this:
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="htmlstrict" style="font-family:monospace;">&lt;style type=&quot;text/css&quot;&gt;
div {
	border:1px dashed black;
	background-image:url(../images/sect_bg.png);
	padding:10px;
	margin-bottom:25px;
	clear:both;
}
h2 {
	display:block;
	width:100%;
	height:53px;
	background-repeat:no-repeat;
	background-position:center center;
	margin-top:-33px !important;
	text-align:center;
	background-image:url(../images/blog_title.png);
}
h2 span {
	position:absolute;
	margin-left:-9999px;
}
&lt;/style&gt;
&lt;div&gt;
 &lt;h2&gt;&lt;span&gt;Heading&lt;/span&gt;&lt;/h2&gt;
 &lt;p&gt;Some Text&lt;/p&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>
 In IE7, nothing happened.  In every other browser, the heading moved up.  I started playing with the style sheet, removing parts.  It turns out that the <code>height</code> and <code>width</code> were the problem.  This applied not only to my image replacement, but a plain-old div-with-a-heading-in-it.  The fix for my problem was to create a separate IE7 style sheet with the following:
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">h2<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">53px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>
 I was also informed today that my Internet Explorer 6 Virtual PC image had expired.  As promised, <a href="http://go.microsoft.com/fwlink/?LinkId=70868">Microsoft has released a new Virtual PC image</a>.  While it&#8217;s nice to be able to check against Internet Explorer 6, this <q>refresh cycle</q> isn&#8217;t very convenient.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertdot.org/2007/04/05/internet-explorer-7-heading-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mozilla JavaScript RegExp Test Bug</title>
		<link>http://robertdot.org/2005/07/05/mozilla-javascript-regexp-test-bug/</link>
		<comments>http://robertdot.org/2005/07/05/mozilla-javascript-regexp-test-bug/#comments</comments>
		<pubDate>Tue, 05 Jul 2005 13:49:06 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://robertdot.org/2009/01/14/mozilla-javascript-regexp-test-bug/</guid>
		<description><![CDATA[
 There is what some consider to be a bug in Mozilla&#8217;s JavaScript engine. Basically, if you run a regular expression with a global switch (e.g. /x/g), JavaScript remembers the last match position. This causes the RegExp to sometimes validate as true, and sometimes as false (alternatingly). The Mozilla guys say it isn&#8217;t a bug. [...]]]></description>
			<content:encoded><![CDATA[<p>
 There is what some consider to be a bug in Mozilla&#8217;s JavaScript engine. Basically, if you run a regular expression with a global switch (e.g. /x/g), JavaScript remembers the last match position. This causes the RegExp to sometimes validate as true, and sometimes as false (alternatingly). The Mozilla guys say <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=237111">it isn&#8217;t a bug</a>. However, removing the /g solves the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertdot.org/2005/07/05/mozilla-javascript-regexp-test-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

