<?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>Flav36rs &#187; bug</title>
	<atom:link href="http://flav36rs.com/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://flav36rs.com</link>
	<description>Just another technical blog</description>
	<lastBuildDate>Mon, 12 Sep 2011 16:56:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Fixing the incorrect auto date and time on the iPhone 4</title>
		<link>http://flav36rs.com/2011/01/31/fixing-the-incorrect-auto-date-and-time-on-the-iphone-4/</link>
		<comments>http://flav36rs.com/2011/01/31/fixing-the-incorrect-auto-date-and-time-on-the-iphone-4/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 23:42:43 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=759</guid>
		<description><![CDATA[If you are having problems with your iPhone 4 displaying the incorrect date and time when using the &#8220;Set Automatic&#8221; option, there are a number of possible solutions that could fix the problem. The issue in my case seemed to &#8230; <a href="http://flav36rs.com/2011/01/31/fixing-the-incorrect-auto-date-and-time-on-the-iphone-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are having problems with your iPhone 4 displaying the incorrect date and time when using the &#8220;Set Automatic&#8221; option, there are a number of possible solutions that could fix the problem.</p>
<p>The issue in my case seemed to be caused by the the phone shutting down automatically due to an empty battery, although there may be other causes.<span id="more-759"></span></p>
<p>Having searched the web for a solution, there are a number of possible ways to fix the issue, with many appearing to work in some cases but not others:</p>
<ul>
<li>Simply turning &#8220;<em>Set Automatically</em>&#8221; to <strong>OFF</strong> then back <strong>ON</strong>.</li>
<li>Going to <em>Utilities &gt; Clock</em> and removing the World clocks, then switch the phone off and on again.</li>
<li>Hard rebooting the phone by holding down the home and on / off button at the same time (until the Apple logo appears).</li>
</ul>
<p>For me the problem was solved by carrying out the following actions:</p>
<ol>
<li>Go to <em>Settings &gt; General &gt; Date &amp; Time</em>.</li>
<li>Turn the &#8220;<em>Set Automatically</em>&#8221; option to <strong>OFF</strong></li>
<li>Plug the phone into your computer and <strong>sync</strong> it using iTunes.</li>
<li>Go back to the Date &amp; Time options page and switch &#8220;<em>Set Automatically</em>&#8221; back to <strong>ON</strong>.</li>
</ol>
<p>You may have to try a combination of the methods listed above, or if you have an alternative solution to the problem then let us all know.</p>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2011/01/31/fixing-the-incorrect-auto-date-and-time-on-the-iphone-4/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>jQuery document ready bug in Safari / WebKit</title>
		<link>http://flav36rs.com/2010/01/04/jquery-document-ready-bug-in-safari-webkit/</link>
		<comments>http://flav36rs.com/2010/01/04/jquery-document-ready-bug-in-safari-webkit/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:52:28 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[1.3.2]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[ready]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=623</guid>
		<description><![CDATA[There is an issue with the jQuery 1.3.2 document ready function in WebKit based browsers that which can cause numerous problems if you are manipulating the DOM, in my situation getting the width / height of an element. Using the &#8230; <a href="http://flav36rs.com/2010/01/04/jquery-document-ready-bug-in-safari-webkit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There is an issue with the jQuery 1.3.2 document ready function in WebKit based browsers that which can cause numerous problems if you are manipulating the DOM, in my situation getting the width / height of an element.</p>
<p>Using the <strong>.width()</strong> and <strong>.height()</strong> methods were working fine in every other browser but <strong>Safari</strong>, which I thought was a little bit odd. After trying to come up with an alternative method of coding calculating the heights and comparing them in <strong>FireBug</strong> and <strong>Web Inspector</strong>, I set about Googling the problem.<span id="more-623"></span></p>
<p>The only problem was that I had no idea what to search for, so started with the term &#8220;jquery height in safari&#8221;. The <a href="http://old.nabble.com/Safari-unable-to-get-width-and-height-of-image.-td17511293s27240.html" target="_blank">first result</a> looked promising but took a fair bit of reading, although it proved to be worth while in the end. One comment pointed out that you should try to:</p>
<blockquote><p><strong>use jQuery(window).load() instead of jQuery(document).ready()</strong></p></blockquote>
<p>I tried this and straight away saw the results that were expected. The problem was that I didn&#8217;t really want to stop using the preferred document ready method <em>($(function() { &#8230; });)</em>, so searched the <a href="http://dev.jquery.com/" target="_blank">jQuery Bug Tracker</a> for any sign of a bug report.</p>
<p>I eventually found one highlighting the exact problem I was having, issue <a href="http://dev.jquery.com/ticket/5521" target="_blank">#5521</a>. The solution came in the form of a patch the document ready function that targets Safari.</p>
<p><code>+ if (jQuery.browser.safari &amp;&amp; document.readyState != "complete") {<br />
+ setTimeout( arguments.callee, 100 );<br />
+ return;<br />
+ }</code></p>
<p>It doesn&#8217;t look like this fix (nor any other form of solution) have been included in the latest nightly build, so I&#8217;m opting for the window load solution for now.</p>
<p><strong>EDIT:</strong> Another solution to this problem is  to simply include any CSS files before the inclusion of the jQuery file. I found this by browsing the bug tracker and coming across<a href="http://dev.jquery.com/ticket/3690" target="_blank"> ticket #3690</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2010/01/04/jquery-document-ready-bug-in-safari-webkit/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>JS preload image &#8216;bug&#8217; in Opera</title>
		<link>http://flav36rs.com/2009/03/02/js-preload-image-bug-in-opera/</link>
		<comments>http://flav36rs.com/2009/03/02/js-preload-image-bug-in-opera/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 14:48:39 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[preload]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=181</guid>
		<description><![CDATA[I have recently attempted to load an image in JavaScript (using jQuery) and once loaded get it&#8217;s dimensions. Using the following code I managed to successfully read the width and height properties in FireFox 2/3, IE 6/7, Windows Safari 3/4 &#8230; <a href="http://flav36rs.com/2009/03/02/js-preload-image-bug-in-opera/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have recently attempted to load an image in JavaScript (using <a href="http://jquery.com/">jQuery</a>) and once loaded get it&#8217;s dimensions.</p>
<p>Using the following code I managed to successfully read the width and height properties in <a href="http://www.mozilla-europe.org/en/firefox/">FireFox</a> 2/3, <a href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">IE</a> 6/7, <a href="http://www.apple.com/safari/download/">Windows Safari</a> 3/4 and <a href="http://www.google.co.uk/chrome/">Google Chrome</a>, but the dimensions were not available in <a href="http://www.opera.com/">Opera</a> (10).<span id="more-181"></span></p>
<pre lang="javascript">$('<img alt="" />')
	.load(function() {
		$('body').append(this);
		var w = this.width;
		var h = this.height;
		//..
	})
	.error(function() {
		//..
	})
	.attr('src', '/path/to/image.jpg');</pre>
<p>After a fair bit of time playing around trying to debug this small snippet of code, I <em>eventually</em> discovered that if the image was appended to the DOM <strong>after</strong> the width and height had been read then Opera would report the values correctly.</p>
<pre lang="javascript">		var w = this.width;
		var h = this.height;
		$('body').append(this);
		//..</pre>
<p>Simply moving line 3 down to below the reading of dimensions solved this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2009/03/02/js-preload-image-bug-in-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Opacity in Opera using jQuery</title>
		<link>http://flav36rs.com/2009/02/26/css-opacity-in-opera-using-jquery/</link>
		<comments>http://flav36rs.com/2009/02/26/css-opacity-in-opera-using-jquery/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:05:51 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=134</guid>
		<description><![CDATA[Whilst attempting to cross browser test a jQuery plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of Opera (9.23). $("#id").css({opacity: 0.8}); It turns out that the latest version of &#8230; <a href="http://flav36rs.com/2009/02/26/css-opacity-in-opera-using-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Whilst attempting to cross browser test a <a href="http://jquery.com/">jQuery</a> plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of <a href="http://www.opera.com/browser/">Opera</a> (9.23).</p>
<pre lang="javascript">$("#id").css({opacity: 0.8});</pre>
<p>It turns out that the latest version of <a href="http://docs.jquery.com/Downloading_jQuery">jQuery (1.3.1)</a> doesn&#8217;t believe that Opera 9.2 supports CSS opacity, and therefore it is ignored completely.<span id="more-134"></span></p>
<p>There are two possible fixes for this, the first is to simply <strong>upgrade Opera</strong> to a newer version (the latest is 9.6.3).</p>
<p>The second option is to tell jQuery that opera does support opacity using the following &#8211; or similar &#8211; within your script:</p>
<pre lang="javascript">if ($.browser.opera) {
    $.support.opacity = true;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2009/02/26/css-opacity-in-opera-using-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS: Extra Button Padding in IE</title>
		<link>http://flav36rs.com/2008/10/29/css-extra-button-padding-in-ie/</link>
		<comments>http://flav36rs.com/2008/10/29/css-extra-button-padding-in-ie/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 19:43:42 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=76</guid>
		<description><![CDATA[Today at work I was asked how to remove the extra padding added to buttons (both the button tag and input[type=button]) in Internet Explorer. The Problem: In the example below there is a standard button with 10px padding on all &#8230; <a href="http://flav36rs.com/2008/10/29/css-extra-button-padding-in-ie/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today at work I was asked how to remove the extra padding added to buttons (both the button tag and input[type=button]) in Internet Explorer.</p>
<p><strong>The Problem:</strong></p>
<p>In the example below there is a standard button with 10px padding on all sides. Internet explorer chooses to add additional horizontal padding:</p>
<p><img class="aligncenter size-full wp-image-78" title="ie-button-padding" src="http://36flavours.com/blog/wp-content/uploads/2008/10/ie-button-padding.gif" alt="" width="133" height="76" /></p>
<p><strong>The solution:</strong></p>
<p>After coming across this problem myself in the past, I eventually remembered that there are two CSS styles you can add to fix this <span style="text-decoration: line-through;">bug</span> feature in IE:</p>
<pre lang="css">button {
	width: auto;
	overflow: visible;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2008/10/29/css-extra-button-padding-in-ie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JS submit is not a function</title>
		<link>http://flav36rs.com/2008/03/25/js-submit-is-not-a-function/</link>
		<comments>http://flav36rs.com/2008/03/25/js-submit-is-not-a-function/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 21:45:02 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[submit]]></category>

		<guid isPermaLink="false">http://sha.re.it/2008/03/25/js-submit-is-not-a-function/</guid>
		<description><![CDATA[Today I was asked by a colleague to aid them with adding functionality to a form that would allow it to be submitted by pressing &#8216;ctr + s&#8217; keys. As a group of web developers this key combination is something &#8230; <a href="http://flav36rs.com/2008/03/25/js-submit-is-not-a-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I was asked by a colleague to aid them with adding functionality to a form that would allow it to be submitted by pressing &#8216;ctr + s&#8217; keys.</p>
<p>As a group of web developers this key combination is something that comes almost naturally to us when editing and constantly saving code, so should prove a useful addition to the form that is not too difficult to implement.</p>
<p>I began by setting up the event observers to watch for the two required keys to be pressed.</p>
<p>Once the required key codes ( 17 and 83 ) were captured it should have been a case of simply referencing the form and applying the submit method.</p>
<pre lang="javascript">document.forms['form_id'].submit();</pre>
<p>To see if what was written so far would actually perform the desired action we tested the page using our default browser <a href="http://www.mozilla.com/firefox/" title="Mozilla Firefox" target="_blank">Firefox</a>, only to discover we were receiving the following error:</p>
<blockquote><p>document.forms.form_id.submit is not a function</p></blockquote>
<p>This was all very puzzling but eventually resorting to a search on <a href="http://www.google.co.uk/search?q=submit+is+not+a+function" title="Google Search Results" target="_blank">Google</a> provided a number of answers.</p>
<p>It turns out that all our problems came back to the fact that the submit button on the form had been given the name of &#8216;submit&#8217; &#8211; which is a JavaScript reserved word &#8211; resulting in ambiguity in the browser and therefore no longer referencing the method.</p>
<p>The solution to this is a very simple one &#8211; renaming the submit button to anything other than &#8216;submit&#8217; or any of the <a href="http://www.javascriptkit.com/jsref/reserved.shtml" title="List of reserved words in JavaScript" target="_blank">reserved words</a> in JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://flav36rs.com/2008/03/25/js-submit-is-not-a-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

