nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
586 stars 319 forks source link

Poor scrolling performance of search results in Safari on macOS #679

Closed marcusseto closed 6 years ago

marcusseto commented 6 years ago

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

The search results for the search bar at the top of the page do not scroll smoothly.

If the current behavior is a bug, please provide the steps to reproduce. If possible, please upload a screenshot or link to a video recording (on macOS you can use QuickTime) demonstrating the problem.

Type PL or UTC in the search bar at the top of the page and scroll. (This problem is presently only known to exist in Safari on macOS. It is not reproducible in Safari on iPad, Chrome on Linux, and Chrome on Android.)

It seems to be a layout or rendering issue. See highlighted portion of timeline below.

screen shot 2018-01-09 at 5 34 29 pm

What is the expected behavior?

Search results should scroll smoothly.

Further information

taneliang commented 6 years ago

ModulesSelect's dropdown is jittery as well, but the scrolling performance is nowhere as bad as the global search dropdown.

screen shot 2018-01-09 at 6 28 39 pm
ZhangYiJiang commented 6 years ago

This article from Google Developers mentions that we can force the browser to introduce a new layer by abusing the transform property, which may help

For browsers that don’t support will-change, but benefit from layer creation, such as Safari and Mobile Safari, you need to (mis)use a 3D transform to force a new layer

If you can, help try the above in the inspector and see if it helps.

There are a few other possible culprits I have in mind which if you have the time you can try to disable/enable individually to see if they are causing the issue: