W3C home > Mailing lists > Public > public-coremob@w3.org > March 2012

Re: Charter [via Core Mobile Web Platform Community Group]

From: <andrea.giammarchi@nokia.com>
Date: Wed, 29 Feb 2012 17:50:43 +0000
To: <jsoref@rim.com>
CC: <public-coremob@w3.org>
Message-ID: <A34B2721-7FE4-4435-BD8F-492ED61366D3@nokia.com>
UA sniffing for pointer detection has never been a solution, neither the Modernizer approach. Here the proof:


A touch enabled device is user dependent, and if Touch events are implemented as it is for all current browsers, these are fired before mouse events.

A solution I have talked about and used on daily basis in our HTML5 Web App is to lazy detect the user intention.

The user use a mouse, mouse events should be fired, no touch events upfront, we are in a mouse environment.
The user touch the screen, she probably gonna use fingers all the time due configuration of its device, a laptop switched into touch screen, or because she prefers to touch the page, rather than use other pointers such trackpad, mouse, or anything not Touch related.

It's a problem when your device, as it is probably for your Lenovo, exposes mouse events even if you are touching the screen … but these are things the OS should solve, not the Web, because otherwise there is no way to make everybody happy.

You can centralize events through a single entry point, and attach them, or swap them if you are brave enough, accordingly with the interaction.

touchstart means user chose to touch, mousedown or even before mousemove or wheel events, means the user chose a different pointer.

Media queries here do not help at all since presentation layer has nothing to do with the way the user interacts with the page.

My 2 cents.

Best Regards

On Feb 29, 2012, at 4:45 PM, ext Josh Soref wrote:

> Marcos wrote:
>> What feature did I use?
>> Which working group am I going to complain to?
>> There is no "W3C iPad detection" feature, AFAIK :)
>> The point is that some things are identified best at features and others as
>> use cases… I needed to detect an iPad because I needed to add touch enabled
>> scrolling, but only for the iPad (and not for Desktop).
> I have a netbook (Lenovo Ideapad S10-3t Netbook), it can act like a normal laptop, or I can rotate the screen and fold it down. At which point, it's a tablet.
> My netbook is full touch screen. And you've just discriminated against it..
> You don't need to detect "iPad". I also have devices with touchpads. Please don't assert that you need to detect a specific piece of hardware. You should instead be doing something like this:
> If (iPad) then
> Redirect_to(TouchOriented)
> Else if (tinyScreen) then
> Redirect_to(MiniSite)
> Else
> Redirect_to(Desktop)
> On each of Desktop, MiniSite, and TouchOriented, you should have at the top/bottom buttons the user can click to change between Desktop, MiniSite, and TouchOriented. So if you don't have sniffing for my Ideapad S10-3t, I can still get to the TouchOriented site if I want to.
> Technically the "right way" to do detection at this point is with CSS Media Queries fwiw. And there are discussions in www-style about adding some more device characteristics to make it easier to get this right.
> ---------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system.. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Received on Thursday, 1 March 2012 07:16:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:05:44 UTC