Skip to content

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

fix press back when keyboard open causing issue

ammarahm-ed714da28c1c01
diff --git a/apps/mobile/src/views/Editor/EditorHeader.js b/apps/mobile/src/views/Editor/EditorHeader.js
index 076f40fe8..a0cab4a97 100644
--- a/apps/mobile/src/views/Editor/EditorHeader.js
+++ b/apps/mobile/src/views/Editor/EditorHeader.js
@@ -38,6 +38,7 @@ import {
eOpenPublishNoteDialog
} from '../../utils/Events';
import { tabBarRef } from '../../utils/Refs';
+import { sleep } from '../../utils/TimeUtils';
import { EditorTitle } from './EditorTitle';
import {
clearEditor,
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index 37e231354..afb563ba8 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -676,6 +676,7 @@ export async function clearEditor(
immediate = false
) {
try {
+ console.log("closing session: ",closingSession);
closingSession = true;
tiny.call(EditorWebView, tiny.isLoading);
if (clear) {
@@ -694,6 +695,7 @@ export async function clearEditor(
let func = async () => {
try {
console.log('reset editor');
+ await sleep(300);
reset && EditorWebView.current?.reload();
// if (DDS.isTab) {
// await waitForEvent('webviewOk');