Open benlk opened 8 years ago
The floating social buttons will display as long as both the top and bottom offset were offscreen, which could happen for as little as 2 pixels' scrolling distance if a posts is barely long enough.
The fix for this is contained in https://github.com/nprds/editorial-wp-site/pull/25 (private repo), but consists of the following change in floating-social-buttons.js
floating-social-buttons.js
- if (scrollTop > offsets[0] && scrollBottom < offsets[1]) - return true; + if (scrollTop > offsets[0] && scrollBottom < offsets[1]) { + if ( ( offsets[1] - offsets[0] ) > ( window.innerHeight * 2 ) ) { + return true; + } + }
Should we implement this in Largo?
prevent floating social buttons from flashing on barely-long-enough posts
The floating social buttons will display as long as both the top and bottom offset were offscreen, which could happen for as little as 2 pixels' scrolling distance if a posts is barely long enough.
The fix for this is contained in https://github.com/nprds/editorial-wp-site/pull/25 (private repo), but consists of the following change in
floating-social-buttons.js
Should we implement this in Largo?