ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.61k stars 336 forks source link

"." Shortcut does not work on iOS #1372

Open chrisdeeming opened 1 year ago

chrisdeeming commented 1 year ago

image

With the above setting enabled in iOS, tapping space twice does not produce a "." as expected.

Quite an unexpected and unusual omission. Not seen a RTE be affected by this before. Note this affects TipTap too.

josephdpurcell commented 1 year ago

On iOS 15.6.1 I do not see the issue. Screen recording attached using the example website https://prosemirror.net/

If helpful, here is some context:

Details For some context, I was looking into various Markdown editors as part of a discussion on Directus https://github.com/directus/directus/discussions/16762, and I ended up creating a spreadsheet evaluating various editors that have issues with iOS features: [https://docs.google.com/spreadsheets/d/18v2G44v0ix41xbAseOIcMcFOMNluc67IJz9f2U5IpRo/edit?usp=sharing](https://docs.google.com/spreadsheets/d/18v2G44v0ix41xbAseOIcMcFOMNluc67IJz9f2U5IpRo/edit?usp=sharing) Then (and now) I found that ProseMirror does not have the issue, but TipTap (which is based on ProseMirror) has the issue which I filed here: https://github.com/ueberdosis/tiptap/issues/3578, which I see is commented. I did not investigate if ProseMirror actually had the issue and the example site was somehow masking it, or if TipTap introduces the issue on top of ProseMirror. Worth noting is that CodeMirror 6 does not have the issue, which is authored by the same or similar people.

https://user-images.githubusercontent.com/778111/235573048-70df792a-804e-452c-8243-2d5403ba723f.MOV

Edit: fixed link formatting.

chrisdeeming commented 1 year ago

@josephdpurcell I can reproduce it in PM too though on iOS 16.5 beta.

Somewhat intermittent.

Not working:

https://user-images.githubusercontent.com/2158514/235609403-c8af5004-46db-4fa2-985b-30feb87b87f1.MOV

Working:

https://user-images.githubusercontent.com/2158514/235609469-38ccaa2b-2f24-4ea4-880b-c2f09d37a901.MOV

It may be the case that the caret position affects the ability to use double space. In between existing paragraphs and it doesn't work. Place at the end of the last paragraph and it works:

https://user-images.githubusercontent.com/2158514/235609904-fc8d8a60-8f05-428d-a74a-c025629e21f6.MOV

neongreen commented 1 year ago

Can also reproduce with current https://prosemirror.net and iOS 16.5 (not beta).

Is it something that’s supposed to work in a custom editor, even? Or would ProseMirror have to exactly reimplement iOS behavior?

Any workarounds are very welcome.

https://github.com/ProseMirror/prosemirror/assets/1523306/780e316b-4869-4b90-857e-dc3865c72b17

chrisdeeming commented 1 year ago

@neongreen I’ve not previously come across any rich text editor where it doesn’t work. Not sure what in ProseMirror is blocking it.

That being said; I’m running iOS 17 and I cannot currently reproduce it.

josephdpurcell commented 1 year ago

Interesting. Im on iOS 15 and can reproduce it, and have reproduced it on several text editors. I've been surprised by the behavior and kept track of the issues here: https://docs.google.com/spreadsheets/d/18v2G44v0ix41xbAseOIcMcFOMNluc67IJz9f2U5IpRo/edit?usp=sharing

If the hypothesis is true that the issue lies with iOS, that might explain the confusion I see in issue queues. The hypothesis would be that there is some issue in iOS 15 and 16 (possibly other versions) that prevent autocomplete, autocorrect, and autopunctuation from behaving correctly on some (but not all) text editors, and is resolved in iOS 17.

If the hypothesis is not correct then confusion remains and I don't have a suggestion.

I'll make a note and if I have time I will test iOS 17 on the text editors I found issues on and report back.

gingersoulrecords commented 5 months ago

@josephdpurcell what did you find?