Open imjeen opened 3 years ago
Nice polyfill! I'd like to see block: 'center'
and block: 'nearest'
work as well.
I am also experiencing this issue for X axis smoothscroll for all browsers on iOS (Safari, Chrome & Firefox). Currently all is functioning on Android, MacOS, and Windows.
scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' })
Same behavior as the CodePen linked in original post with block: 'center'
Live Example Link for Mobile - https://ryansrealty.idxstaging.com/idx/market-reports/a001/city/springfield-oregon Recently Sold Section -> Click on a black circle pin on the map.
Video Example of behavior - https://drive.google.com/file/d/1VAm1yu7hXbYEybGrTwVSPGJFkHJlW60P/view?usp=sharing
Expected: Element will be in the center of the viewport of the device.
damn, i hope it will work
how to resolve it...
use native API scrollIntoView and make someone element scrolling to center, see Demo in codepen in Safari.
the polyfill cannot make it center in Safari, it looks like only for
inline: 'sart'