fix Scroll Into View

This commit is contained in:
ammarahm-ed
2021-02-08 10:30:42 +05:00
parent 1b6f5f46b0
commit 0f280b88e9

View File

@@ -72,9 +72,10 @@ function init_tiny(size) {
});
editor.on('ScrollIntoView', (e) => {
e.preventDefault();
let offset = e.elm.offsetTop + 60;
console.log(e)
document.scrollingElement.scrollTo({top:offset})
e.elm.scrollIntoView({
behavior: 'smooth',
block: 'nearest',
});
});
editor.on('keyup', onChange);