Jump to end of note content. See issue #7

This commit is contained in:
Matias De lellis
2022-05-14 10:40:22 -03:00
parent 39c436c352
commit 78e39d7c34

View File

@@ -987,6 +987,15 @@ View.prototype = {
note.css({"opacity": "0.1"});
modal.css({"opacity": "0.1"});
/* Move caret to end of content */
var range = document.createRange();
range.selectNodeContents($('#content-editable')[0]);
range.collapse(false);
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
/* Animate to center */
var windowWidth = $(window).width();