Skip to content

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

fix tapping in empty editor not focus keyboard

ammarahm-ed1b0b6c1ed6a3
diff --git a/apps/mobile/html/Web.bundle/site/init.js b/apps/mobile/html/Web.bundle/site/init.js
index a81e7c7a6..3d7dd0b6e 100755
--- a/apps/mobile/html/Web.bundle/site/init.js
+++ b/apps/mobile/html/Web.bundle/site/init.js
@@ -390,11 +390,12 @@ function init_tiny(size) {
onChange({type: 'paste'});
});
- editor.on('tap', e => {
- if (e.target.classList.contains('mce-content-body')) {
- e.preventDefault();
- }
- });
+ if (
+ e.target.classList.contains("mce-content-body") &&
+ !e.target.innerText.length > 0
+ ) {
+ e.preventDefault();
+ }
editor.on('focus', function () {
reactNativeEventHandler('focus', 'editor');