needim / wdt-emoji-bundle

Slack like emoji picker with apple/ios, twitter/twemoji, google, emojione, facebook, messenger emoji support
http://ned.im/wdt-emoji-bundle
MIT License
419 stars 87 forks source link

sticky tabs bug - widget scrolls all the way to the bottom #18

Closed dylanjha closed 7 years ago

dylanjha commented 7 years ago

As far as I know this did not happen before, but it does now and I have not updated versions. Maybe something in chrome changed?

See in the gif from the demo page that when clicking some of the tabs the widget scrolls all the way to the bottom. I spent a long time debugging this but was not able to find a solution.

screen recording 2017-03-07 at 04 53 pm

tsogtbayar0821 commented 7 years ago

same here, help me

needim commented 7 years ago

weird, for quick fix delete sticky function calls at https://github.com/needim/wdt-emoji-bundle/blob/master/wdt-emoji-bundle.js#L341

I will take a look later in this month, currently a little bit busy.

tsogtbayar0821 commented 7 years ago

try it like follow

on line 627

css(el.parentNode, {'padding-top': el.getBoundingClientRect().height + 'px'});

this is comment. https://github.com/needim/wdt-emoji-bundle/blob/master/wdt-emoji-bundle.js#L627 maybe works well

ryantgraham commented 7 years ago

This is because of Scroll Anchoring that was introduced as an experimental feature in Chrome 51: https://developers.google.com/web/updates/2016/04/scroll-anchoring

and then enabled by default in Chrome 56: https://www.chromestatus.com/feature/5700102471548928

This can be fixed by adding overflow-anchor: none; to .wdt-emoji-scroll-wrapper.

dylanjha commented 7 years ago

@ryantgraham very good find 🔎 🕵️

Redsandro commented 7 years ago

Good find indeed. @needim doesn't need to investigate.

dylanjha commented 7 years ago

I'll push up a fix for this