Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix Scroll Into View

ammarahm-ed0f280b88e9a4
diff --git a/apps/mobile/html/Web.bundle/site/init.js b/apps/mobile/html/Web.bundle/site/init.js
index 93daf83c8..cc72315a9 100644
--- a/apps/mobile/html/Web.bundle/site/init.js
+++ b/apps/mobile/html/Web.bundle/site/init.js
@@ -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);