Dependent Origination

Don’t name your buttons ‘Go’.

Posted on: March 2, 2011

The iPhone app I wrote has annoyingly slow start on page animation on iOS 4.1. I started noticing it a couple days before launch and putting a few hours at least twice trying to figure out what is going on. By logging, I realize it is a webkitAnimationEnd event fired off very late. Today another person who is more familiar with webkit reminds me that also means the animationStart starts late too. And that made me realize it could be a bug on our own code, contrary to what I believed a few days ago, an iOS bug.

Well it is still an iOS bug since our app runs beautifully on 4.2 and up. But maybe I can make it disappear by checking into the DOM of our app. So I spent another few hours today starting from a single page and see when the slow start on animation happens, by just deleting DOM elements from the page. And I found it. It is a room search box. And then by using the same elimination technique, I realize it is because of the following HTML:

<input type=’submit’ value=’Go’ />

Removing the value makes the slow start on page animation disappear!

Can you believe it? I have no idea why a button named Go would cause such extensive damage. Apparently, it won’t for iOS 4.2 and up. So the moral of this story: don’t name your buttons ‘Go’.

Feels very good when you fix a persistent, annoying and previously thought cannot-be-fixed bug🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

March 2011
M T W T F S S
« Feb   Apr »
 123456
78910111213
14151617181920
21222324252627
28293031  

Twitter

  • is emptying trash and happily discovering the available disk space now ranks at 100G+. 4 days ago
  • is looking at other people's intentions, not their capabilities, and feeling much happier every day :) 11 months ago
  • is planning on how to spend the next two weeks until the new year, at home. 11 months ago
  • is going to have human company for Thanksgiving; a rare event for the past like twenty years. 1 year ago
  • living by myself again; a strange feeling in a bustling city with thirteen million people 1 year ago

Flickr Photos

IMG_3517

IMG_3515

IMG_3505

IMG_3497

IMG_3261

IMG_3260

IMG_3255

IMG_2736

IMG_2733

IMG_2629

More Photos
%d bloggers like this: