Javascript .scrollIntoView(boolean)
provide only two alignment option.
What if I want to scroll the view such that. I want to bring particular element somewhere in middle of the page?
try this :
document.getElementById('myID').scrollIntoView({
behavior: 'auto',
block: 'center',
inline: 'center'
});
refer here for more information and options : https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView