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

iOS/Safari: "Select all" results in empty selection on large documents #1304

Closed
personalizedrefrigerator opened this issue Dec 5, 2023 · 1 comment

Comments

@personalizedrefrigerator
Copy link

personalizedrefrigerator commented Dec 5, 2023

Describe the issue

On sufficiently large documents, pressing "select all" in the iOS pop-up context menu moves the cursor, rather than selecting.

Screen recording:

RPReplay_Final1701752181.mov

Browser and platform

iOS 17.1.2

Reproduction link

https://codemirror.net/try/?c=aW1wb3J0IHttaW5pbWFsU2V0dXAsIEVkaXRvclZpZXd9IGZyb20gImNvZGVtaXJyb3IiCgpjb25zdCBsaW5lcyA9IFtdCgpmb3IgKGxldCBpID0gMDsgaSA8IDUwMDsgaSsrKSB7CiAgbGluZXMucHVzaChgTGluZSAke2l9YCkKfQoKbmV3IEVkaXRvclZpZXcoewogIGRvYzogbGluZXMuam9pbignXG4nKSwKICBleHRlbnNpb25zOiBtaW5pbWFsU2V0dXAsCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==

@personalizedrefrigerator personalizedrefrigerator changed the title iOS/Safari: "Select all" results i empty selection on large documents iOS/Safari: "Select all" results in empty selection on large documents Dec 5, 2023
marijnh added a commit to codemirror/view that referenced this issue Dec 14, 2023
To work around poor iOS behavior on select-all.

Issue codemirror/dev#1304
@marijnh
Copy link
Member

marijnh commented Dec 14, 2023

When the viewport doesn't cover the entire document, it seems the height placeholders rendered instead of the hidden content confuse Safari a lot—it refuses to select anything when they are uneditable. When made editable, it still doesn't select them for some reason. Attached patches add kludges to make this work.

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

No branches or pull requests

2 participants