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

Can't type return after single-character paragraph on mobile Safari #1034

Closed
dgreensp opened this issue Feb 22, 2020 · 6 comments
Closed

Can't type return after single-character paragraph on mobile Safari #1034

dgreensp opened this issue Feb 22, 2020 · 6 comments

Comments

@dgreensp
Copy link

@dgreensp dgreensp commented Feb 22, 2020

Issue details

After typing a single-character paragraph such as "a," the "return" key on the onscreen keyboard on iOS doesn't do anything.

Steps to reproduce

In any ProseMirror (such as the basic example), on mobile Safari, start with the insertion point on a blank line. Then type a letter such as "a," followed by "return." The "return" will not do anything.

@dgreensp

This comment has been minimized.

Copy link
Author

@dgreensp dgreensp commented Feb 22, 2020

The problem seems to be related to whether the browser selection is attached to the paragraph or the text.

@jljorgenson18

This comment has been minimized.

Copy link

@jljorgenson18 jljorgenson18 commented Feb 22, 2020

I experienced this as well. It looks like it's the result of the fix for #982.

@marijnh

This comment has been minimized.

Copy link
Member

@marijnh marijnh commented Mar 17, 2020

It seems no actual DOM changes are generated in this case, preventing the code that is supposed to handle this from running. Investigating.

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Mar 17, 2020
FIX: Make sure enter on iOS is handled even when the native behavior
has no effect.

Issue ProseMirror/prosemirror#1034
@marijnh

This comment has been minimized.

Copy link
Member

@marijnh marijnh commented Mar 17, 2020

Attached patch works around this. I've released it as prosemirror-view 1.14.4. Can you confirm that it solves the issue for you?

@jordoh

This comment has been minimized.

Copy link

@jordoh jordoh commented Mar 17, 2020

Attached patch (and 1.14.4) solves the issue for me (iOS 13.3, on both simulator and physical device, which were exhibiting the issue on 1.14.2)

@marijnh

This comment has been minimized.

Copy link
Member

@marijnh marijnh commented Mar 17, 2020

Wonderful. Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.