Notes on scrollIntoView method bugs in iOS Safari
- Summary: Safari does not support all options of scrollIntoView
- reference: https://caniuse.com/?search=scrollIntoView
- Tested on Safari 13 and 14
- List of bugs
- The behavior: ‘smooth’ option is not supported
- Symptom: Scroll does not work
- Solution: Use behavior: ‘auto’
- An officially recognized bug
- inline: ‘nearest’ behaves abnormally during horizontal scrolling
- Symptom: When triggering the scrollIntoView method on one of three or more elements, it cannot scroll to an element located in the middle (positioned between other elements)
- Solution: Use inline: ‘end’
- An undocumented bug
- The behavior: ‘smooth’ option is not supported
20210729
Leave a comment