Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display an error message when the mobile note editor fails to load #9783

Closed
personalizedrefrigerator opened this issue Jan 25, 2024 · 2 comments
Assignees
Labels
bug It's a bug editor high High priority issues mobile All mobile platforms

Comments

@personalizedrefrigerator
Copy link
Collaborator

Operating system

Android

Joplin version

2.14.10

Desktop version info

No response

Current behaviour

Currently, when the note editor is loaded on a device with an incompatible version of the Android System WebView (or iOS), the editor is blank.

Expected behaviour

We should display an error message.

On Android:

  • Explain how to update the Android System WebView
  • Give the user the option to switch to the plain editor.

On iOS:

  • Give the user the option to switch to the plain editor.

Depending on what's causing the issue, we may also want to look into transpiling CodeMirror with babel or adding polyfills.

Logs

No response

@personalizedrefrigerator
Copy link
Collaborator Author

personalizedrefrigerator commented Feb 23, 2024

I'm getting a syntax error when loading the note editor on Safari 11.1 (it doesn't support a?.b syntax):
screenshot: Line beginning with result.selectionLine = ...

The above testing was done on a browserstack.com free account (which seems to only allow 1 minute of testingper browser version). We may be able to fix this by setting the Webpack compilation target to ES5: https://stackoverflow.com/a/64528815.

Edit: The issue seems to be related to the vim emulation package, which we also use for CodeMirror 5 emulation. If the issue is in a plain .js file, we may need to use babel-loader to transpile (rather than relying on TypeScript).

Edit 2: Using babel-loader does seem to fix the issue. I've enabled Babel loader in this branch. I plan to create a pull request after doing more testing.

@laurent22
Copy link
Owner

Not sure if this is fully fixed but I suggest leaving it aside for now in any case. If we still get bug reports about this from users we can reconsider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug editor high High priority issues mobile All mobile platforms
Projects
None yet
2 participants