-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Incompatible with passive event listeners #1217
Comments
I've heard that Blink is planning to make What's the lightest way to detect passive events? Anything more compact than: var supportsPassive = false;
if(Object.defineProperty) {
var opts = Object.defineProperty({}, 'passive', {
get: function() {
supportsPassive = true;
}
});
window.addEventListener('test', null, opts);
} ? |
That's the lightest way to do it, as far as I'm aware. |
It looks like you use pointer events why aren't you checking window.PointerEvent and using the MS specific value instead (navigator.pointerEnabled). That would likely mitigate it because pointer events is going out before the passive event listener intervention. |
@dtapuska, it's a good point, I plan to drop |
FYI... Chrome pointer events are enabled in beta, dev and canary. The intervention is only enabled in canary and dev. |
Sorry for the trouble, this is now a breaking change in Chrome 56 to improve scroll performance. You can probably fix this by adding an appropriate |
I'm still having problems with this issue. Because of this, when you use photoswipe on mobile devices, when you swipe to close a image, the page jumps to the top, really bad =/ |
@RByers You cannot get rid of the Even if
The only proper way to fix this cross-browser, including getting Chrome to shut its trap, is to employ a bit of intermediary code around libraries' |
Adding |
That makes it a magical cure-all only for Chrome, and that's only in the best case scenario. It's wholy possible and often very desirable to cancel only part of the native behavior and thus the You've also done nothing to address the problems with iOS Safari which supports only a limited subset of |
Added (& tried many combinations of) 'touch-action: none;' everywhere from html to holder div, but error deluge did not cease in any case. Sometimes the list does not respond to dragging, but most of the time works fine even if it does is slower. Error Lines are 612 & 1501 consecutively. Any hope for a fix or recommendation of another cure? |
@basakil, which list? This is PhotoSwipe repo, and it already has |
Oh maan! I thought this was the Sortable group... Sorry. |
fixed by v5.0 |
When used with recent Chrome builds that support passive event listeners, touch interaction leads to a massive spew of errors:
PhotoSwipe needs to detect passive event listener support and explicitly register its document level touch handlers with a
passive: false
option.The text was updated successfully, but these errors were encountered: