Non-touch BlackBerry devices return false positive for Modernizr.touch #372

alexkingorg opened this Issue Sep 11, 2011 · 5 comments


None yet
3 participants

In testing with a BlackBerry Bold 9650, a device without a touch screen, it is returning true on a Modernizr.touch check, but of course there is no way I've found to trigger a 'touchend' event on the device.

The use case I ran into this in was trying to attach to 'touchend' or 'click' based on the mobile browser's capabilities. This was failing on the non-touch BlackBerry device.

I worked around this for my needs by doing an explicit BlackBerry device check, but I figure it's something worth considering for the core lib here.


paulirish commented Dec 10, 2011

Thx for reporting this. Is there a way to report this to RIM?


paulirish commented Dec 10, 2011

I've alerted a RIM contact to this ticket.

Btw this is our current test:

@media (-moz-touch-enabled, -webkit-touch-enabled, ..etc...){
('ontouchstart' in window) || 
  window.DocumentTouch && document instanceof DocumentTouch || 
  (hash['touch'] && hash['touch'].offsetTop) === 9

paulirish commented Dec 12, 2011

From RIM:

Unfortunately, we had a build system issue during BlackBerry 6.0 that caused builds to have WebKit touch support enabled, even for non-touch devices. It's long been fixed, but some public builds do have this issue.

Ah well.


stucox commented Apr 21, 2013

This is well old :)

@alexkingorg – I've added a mention in the module knownBugs metadata (see PR above). Let us know if you had an accurate UA sniff you were able to target that specific device with; in which case we could consider blacklisting it, but it sounds pretty niche. Otherwise I think this is a "won't fix".

stucox closed this Apr 21, 2013

To be honest, I doubt I can even find a device to confirm or test this on anymore. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment