Don’t name your buttons ‘Go’.
Posted March 2, 2011on:
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🙂