I have a roadmap component where bars are arranged by time in horizontal axis (and by anything depending on filters for vertical axis) I am trying to scroll to an HTMLElement using scrollIntoView. The scrolling involves both vertical and horizontal scrolling. I am using scrollIntoView method.
roadmapItemEl.scrollIntoView({ block: 'center', inline: 'center', behavior: 'auto' });
It generally works as expected. However, when it autoscrolls to a bar in the right side of the current activeElement, the whole page shifts to the left, exposing white space. This happens only in Chrome.
(Note: I tried all combinations of the scrollIntoView options. Nothing changed)
After autoscroll to a bar on the right:
(Note: This only gets fixed if I autoscroll to a bar on the left)
I unfortunately cannot share much code, thus I don't expect complete hand-holding here. However, I just need to know what to look for. Here are my questions: