-
Notifications
You must be signed in to change notification settings - Fork 276
Open
Description
We are working on 2 major projects using limejs and strange bug is that many times project stops taking mouse events inside chrome browser. After checking code of limejs we found the bug inside class Node(node.js) , function "lime.Node.prototype.listen"
Inside this function there is a check for touch devices and bypassing mouse events and here chrome returning wrong value, its returning true for non-touch devices as well(laptops)
// Bypass all mouse events on touchscreen devices
if (lime.userAgent.SUPPORTS_TOUCH &&
type.substring(0, 5) == 'mouse') return null;
lime.userAgent.SUPPORTS_TOUCH is defined in useragent.js. So we replaced this check and added manual checking for ios and android device.
// Bypass all mouse events on touchscreen devices
if ((lime.userAgent.IOS || lime.userAgent.ANDROID) &&
type.substring(0, 5) == 'mouse') return null;
You can add other device checks if you want. Finally all mouse events working inside chrome :)
Metadata
Metadata
Assignees
Labels
No labels