A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix text hiding behind keyboard in editor
ammarahm-ed32ac1e3f3948
diff --git a/apps/mobile/android/app/src/main/assets/listeners.js b/apps/mobile/android/app/src/main/assets/listeners.jsindex 7d007cce3..6d2969d01 100644--- a/apps/mobile/android/app/src/main/assets/listeners.js+++ b/apps/mobile/android/app/src/main/assets/listeners.js@@ -27,7 +27,7 @@ function onTitleChange() {}if (titleMessage && typeof titleMessage.value === 'string') {- window.ReactNativeWebView.postMessage(JSON.stringify(titleMessage));+ //window.ReactNativeWebView.postMessage(JSON.stringify(titleMessage));}}@@ -36,7 +36,7 @@ function attachEditorListeners() {editor.once('text-change', function () {- window.ReactNativeWebView.postMessage("loaded");+ //window.ReactNativeWebView.postMessage("loaded");let text = editor.getText();document.getElementById("infowords").innerText = text.split(' ').length + ' words';@@ -161,6 +161,17 @@ function attachEditorListeners() {return whiteSpace;}+ editor.on("selection-change", function(evt) {+ console.log(evt);+ var bounds = editor.getBounds(evt.index, evt.index);+ console.log(bounds)+ setTimeout(() => {+ document.querySelector(".app-main").scrollTo({top:bounds.top,behavior:"smooth"})+ },250)++ });++editor.on('text-change', function (delta, oldDelta, source) {var regex = /https?:\/\/[^\s]+$/;@@ -201,7 +212,7 @@ function attachEditorListeners() {document.getElementById("infowords").innerText = m.text.split(' ').length + ' words';m.html = editor.root.innerHTML;m.type = 'content';- window.ReactNativeWebView.postMessage(JSON.stringify(m));+ //window.ReactNativeWebView.postMessage(JSON.stringify(m));});}\ No newline at end of filediff --git a/apps/mobile/android/app/src/main/assets/styles.css b/apps/mobile/android/app/src/main/assets/styles.cssindex 8476af2f7..2c012a2db 100644--- a/apps/mobile/android/app/src/main/assets/styles.css+++ b/apps/mobile/android/app/src/main/assets/styles.css@@ -38,8 +38,8 @@.ql-editor {box-sizing: border-box;line-height: 1.42;+ height: auto;outline: none;- height:100%;overflow-y: hidden;padding: 12px 12px;tab-size: 4;@@ -47,7 +47,7 @@text-align: left;white-space: pre-wrap;word-wrap: break-word;-}+ }.ql-editor>* {cursor: text;@@ -1061,8 +1061,8 @@display: flex;color: gray;font-size: 11px;- position: absolute;margin-top: -18px;+ height:20px;font-family: 'DM Sans';}@@ -1086,8 +1086,9 @@.app-body {margin: 0px;- overflow:auto;-+}+.app-main {+ overflow: auto;}.floating-toolbar {@@ -1099,5 +1100,5 @@#editor {border: hidden !important;-+}\ No newline at end of filediff --git a/apps/mobile/android/app/src/main/assets/texteditor.html b/apps/mobile/android/app/src/main/assets/texteditor.htmlindex 1541f325f..5961a760b 100644--- a/apps/mobile/android/app/src/main/assets/texteditor.html+++ b/apps/mobile/android/app/src/main/assets/texteditor.html@@ -5,6 +5,7 @@<link href="fonts.css" rel="stylesheet"><link href="styles.css" rel="stylesheet"><style>+.ql-toolbar {overflow-x: auto;width: 100vw;@@ -18,24 +19,27 @@</style></head>-<body class="app-body">+<body class="app-body" >+<div class="app-main">+<div id="titlebar"><form id="formBox"><input id="titleInput" placeholder="Title here"/>- <div class="info-bar">- <p id="infowords"></p>- <p>•</p>- <p id="infodate"></p>- <p>•</p>- <p id="infosaved"></p>- </div></form>+ <div class="info-bar">+ <p id="infowords"></p>+ <p>•</p>+ <p id="infodate"></p>+ <p>•</p>+ <p id="infosaved"></p>+ </div></div><div id="editor"></div>+</div><div id="toolbar"></div>-+</div></body><script src="constants.js"></script><script src="listeners.js"></script>@@ -80,6 +84,7 @@fixDropdownMenuLocations();}+ loadAction(true);</script>