-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Chrome V40.0.2214.94 m #240
Comments
Yes, experiencing the same issue. |
I'm also experiencing the same issue. But sometime it works on Chrome as well. Very strange behavior. I can't see any error. |
Maybe I've got the problem: is it possible that you use a PC with both mouse and touchscreen? I had experienced the same issue and afer some investigation I realize that CHROME needs the CLICK event. I had modified the main js by adding the click event |
Have the exact same issue as promoinvideo but using Chrome Version 42.0.2311.135 m (64-bit). On PC with dual monitors and one is a touchscreen, the other is not and the mouse click event is ignored but the touch event is not. Also, if I go into Chrome dev tools and emulate a device and activate "Emulate touch screen", the touch events trigger Sidr. I'll try to figure this out and post back shortly. |
Hopefully the author sees this and updates the code. |
The fix is pretty easy. Change this: (starting on line 289) if('ontouchstart' in document.documentElement) {
$this.bind('touchstart', function(e) {
var theEvent = e.originalEvent.touches[0];
this.touched = e.timeStamp;
});
$this.bind('touchend', function(e) {
var delta = Math.abs(e.timeStamp - this.touched);
if(delta < 200) {
e.preventDefault();
methods.toggle(name);
}
});
}
else {
$this.click(function(e) {
e.preventDefault();
methods.toggle(name);
});
} To This: $this.bind('touchstart', function(e) {
var theEvent = e.originalEvent.touches[0];
this.touched = e.timeStamp;
});
$this.bind('touchend', function(e) {
var delta = Math.abs(e.timeStamp - this.touched);
if(delta < 200) {
e.preventDefault();
methods.toggle(name);
}
});
$this.bind('click', function(e) {
e.preventDefault();
methods.toggle(name);
}); By removing the "ontouchstart" check I could bind both a click and a touch event to the element. Keep in mind I only tested this in Chrome both emulation mode and not. Hope this helps others. |
@pabeln in what file do I apply this fix? jquery.sidr.min.js? Because that doesn't have (even when I use a unminify tool) a line 289. |
@master412160 I used the un-minified code here: |
Thanks, got it. |
…ixes #179 and fixes #266 and fixes #246 and fixes #245 and fixes #211 and fixes #178 and fixes #118 and fixes #98 and fixes #214 and fixes #117 and fixes #130 and fixes #144 and fixes #146 and fixes #165 and fixes #189 and fixes #193 and fixes #203 and fixes #213 and fixes #218 and fixes #240 and fixes #249
Preparing a new version with a fix for this https://github.com/artberri/sidr/tree/reborn |
The sidr menu won't open on this specific version of Chrome and only happens on Windows (tested Windows 8.1), all other browser (FF, Safari, IE work like a charm).
The according classes aren't added on the body like on the other browsers same as the needed css.
Does anyone know how to fix this or has the same issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: