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

Markdown preview rendered for outdated markdown on android #19784

Closed
joschahenningsen opened this issue May 22, 2022 · 13 comments
Closed

Markdown preview rendered for outdated markdown on android #19784

joschahenningsen opened this issue May 22, 2022 · 13 comments
Labels

Comments

@joschahenningsen
Copy link

joschahenningsen commented May 22, 2022

Description

When editing markdown (issue and pull request comments), clicking the preview button on mobile devices when the text input still has focus doesn't render the latest markdown but markdown that misses the latest input instead.

tested on Chrome for Android 11

Gitea Version

1.17.0+dev-610-gfa5dec966

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

22-05-22-22-07-47.mp4

Git Version

No response

Operating System

No response

How are you running Gitea?

Tested this locally and on https://try.gitea.io

Database

SQLite

@joschahenningsen joschahenningsen changed the title Markdown preview rendered for outdated markdown on mobile Markdown preview rendered for outdated markdown on android May 22, 2022
@yp05327
Copy link
Contributor

yp05327 commented Feb 24, 2023

You inputted the characters without confirming them, so they were just Preview Characters in the inputbox.
Then you switched to Preview, of course, the characters in the inpubox weren't changed at that moment.
Then you switched to Write, maybe a feature of your IME? IME automatically 'confirmed' the changes.
Then you switched to Preview, of course, the characters in the inputbox were changed.

Github uses textarea which has no problem, but gitea uses CodeMirror here. Maybe you need to fix this in CodeMirror.

@wxiaoguang
Copy link
Contributor

Gitea 1.18 and newer are using the CodeMirror with contenteditable mode, which brings different editing experience.

Please try if the problem gets better in new releases.

@yp05327
Copy link
Contributor

yp05327 commented Feb 24, 2023

I tested by using Japanese Google IME in 1.18.5 (I only have this which may cause the same problem I think), and it was same.
But Github has no problem.

@wxiaoguang
Copy link
Contributor

Yup, the problem is contenteditable, sometimes it doesn't work well, and that's the reason why there were discussions about dropping EasyMDE&CodeMirror ....

@lunny
Copy link
Member

lunny commented Apr 3, 2023

Should be fixed by #23876 ?

@yp05327
Copy link
Contributor

yp05327 commented Apr 6, 2023

Tested in 1.20.0-361, Preview displayed the characters, but the inputbox was empty.

@wxiaoguang
Copy link
Contributor

Tested in 1.20.0-361, Preview displayed the characters, but the inputbox was empty.

Can you elaborate, or provide some screenshots?

@joschahenningsen
Copy link
Author

Should be fixed by #23876 ?

Yup, seems to be working now 👍

@yp05327
Copy link
Contributor

yp05327 commented Apr 6, 2023

Tested in 1.20.0-361, Preview displayed the characters, but the inputbox was empty.

Can you elaborate, or provide some screenshots?

I can’t upload videos to github on my phone.

Preview is worked.
CF10BBA0-7C16-412E-8D1C-E7541D6D06A9
But the input box is empty.
5C520939-4273-48B0-9540-DFF416BBF8D7

Github have the same behavior, so maybe it is all right.

@wxiaoguang
Copy link
Contributor

I can’t upload videos to github on my phone.
Preview is worked.
But the input box is empty.
Github have the same behavior, so maybe it is all right.

What's the steps? Do you mean that:

  1. Open the New Issue page
  2. Input something into the textarea
  3. Click the Preview
  4. Preview shows
  5. Click Write
  6. The textarea loses its content and becomes empty?

@yp05327
Copy link
Contributor

yp05327 commented Apr 6, 2023

image
I know the reason now LOL

Here is the video:

output1.mp4

@joschahenningsen
Copy link
Author

joschahenningsen commented Apr 6, 2023 via email

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 6, 2023

I guess because you didn't confirm the input in your input method.

The "temp" text is highlighted to show that they are not really in the textarea.

I guess you need to click the "確定" on the virtual keyboard


Let's stop from discussing the new issue on a closed issue, sorry for bothering.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants