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

When readOnly is set true,I can not select all by "command + A" in text mode #142

Closed
masquerader0 opened this issue Sep 14, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@masquerader0
Copy link

It works in v0.7.3 ,but not in 0.7.4https://codesandbox.io/s/svelte-jsoneditor-react-forked-bnhg9q

@josdejong
Copy link
Owner

Thanks for reporting.

Hmmm, this is interesting. In v0.7.4, we disabled the editor when readOnly to prevent the editor from opening the keyboard when on a mobile device, see #130.

It is useful though to still be able to select and move through the editor. I'm not sure how we can solve both issues. Any suggestions @masquerader0 or @fonov?

@josdejong josdejong added the bug Something isn't working label Sep 14, 2022
@bhl-0
Copy link

bhl-0 commented Oct 28, 2022

I'm guessing the reason we want to do command + A in readOnly mode is to select & copy all to clipboard.
Cant we just add a "copy all text" button in menubar in readOnly mode?

@josdejong
Copy link
Owner

I like that idea, thanks.

The tree mode also has a copy button when readOnly, though that will copy the selection and not the full document. I think it's not a big problem if that is not consistent. I expect though that tree mode will still open the mobile keyboard right now, and if so, we should look into that (see also #130).

@josdejong
Copy link
Owner

Fixed via 99922dc, but this fix may bring back the issue that #130 fixed: the mobile keyboard opens when in readOnly mode. It may be fixed in a different way already by fixing #231 via 5df57ee, I'll have to validate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants