Open RByers opened 8 years ago
I certainly can't think of any scenario where you'd get a touchmove that moves things around without also a scroll (except maybe during pinch-zoom)?
You'd think that would be covered by the resize
listener.
Updates? passive event listeners are landed in modern browsers.
@RByers your logic seems sound to me, that scroll
should be enough. I would be in favor of removing touchmove
I think. We would need to ensure that scroll
is sufficient first though.
I work on chromium and was investigating scroll performance on time.com and that led me to the tether.js code that adds a
touchmove
listener.touchmove
(andwheel
) listeners can have a substantial impact on scroll performance. I'd like to understand the use cases here so we can help improve the web platform to avoid the performance implications.Can you help me understand what tether.js's
touchmove
listener is doing? To me it appears to (along with thescroll
andresize
listeners) cause the positions of elements to be updated. But shouldn'tscroll
andresize
be enough on their own? I certainly can't think of any scenario where you'd get atouchmove
that moves things around without also ascroll
(except maybe during pinch-zoom)?We hope to be adding tooling to Chrome devtools to better help site owners blame specific scripts for scroll performance issues. If, as I suspect, the
touchmove
listener in tether.js isn't providing any real value, then hopefully you can just remove it. But if it is, then I'd like to better understand the scenario so we can help address it (maybe with passive event listeners?)