A couple minor updates for Apple’s upcoming Oct. 12 release of iOS 5 should please some Web developers working with the mobile platform.
According to the latest GM changelog, retrieved from a post on BGR, the WebKit framework used in the iOS 5 version of Safari will more closely resemble the desktop version of Safari with the following features:
• There is a new HTML5-compliant parser.
• Text layout width may change slightly because word-rounding behavior now has floating-point-based precision.
• There is improved validation of the <input type=number> form field, which includes removing leading zeros and number formatting.
• Touch events are now supported on input fields.
• <input type=range> is now supported.
• window.onerror is now supported.
• There is a new user agent that does not have locale information in the User Agent string.
• URLs are now canonicalized by making the scheme all lowercase. If a fake URL is used to pass information from a UIWebView back to native code, make sure that the scheme is always lowercase, or that the native code compares the scheme in a case-insensitive manner.
The most important change for Web developers, however, is the addition of the –webkit-overflow-scrollingproperty, which will allow for single-finger scrolling without momentum in an overflow: scroll element:
In iOS 5, a new inherited CSS property, -webkit-overflow-scrolling, is available. The value touch allows the web developer to opt in to native-style scrolling in an overflow:scroll element. The default value for this property is auto, which allows single-finger scrolling without momentum.
On some websites, the lack of overflow: scroll forces users to use two fingers to scroll through Web pages on iOS devices, and has been a recurring issue for some developers who have had to resort to time-consuming custom fixes and jQuery plugins that don’t’ really address the two-finger scrolling issue.
According to data collected by StatCounter, mobile usage worldwide has steadily increased while desktop usage has steadily decreased. Changes like those made in this latest update will only make the desktop-to-mobile compatibility process simpler for developers as this trend continues. While mobile browser compatibility hasn’t been too widely requested by our clients at left-click Advanced, the compatibility improvements are still very welcome for future projects.