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
Copying to clipboard does not work for disabled code interface #11684
Comments
Hi @DL1PZ, I am unable to reproduce it based on the information provided. May I ask which field are you selecting text from? I have created a text input field with only read permissions, and I am able to copy the value by selecting the text. Alternatively, you may copy the raw value via the following method: Screen.Recording.2022-02-20.at.10.19.42.PM.movPlease kindly provide a screen recording or detailed steps to reproduce the issue. |
Thank you very much for trying to reproduce the issue. The issue does not affect fields which are set readonly. As explained in my initial post, it affects fields for that the current user does not have write permissions as well as fields in the revision history view. I hope that helps. If not, I can provide a screen recording. The hint to access the raw value helps a lot as a workaround. Nevertheless, the problem should be solved to provide the expected behavior when selecting text. |
@DL1PZ Please provide screenshots or a screen recording. Thank you. On a side note, I wonder if it is an issue with Testing notesI have tested with the following separately: Read only permissions where user does not have write permissions. Readonly field conditions to disable a field even for user with write permissions And I was unable to reproduce the issue both when copying text from the field and from the revisions drawer preview. The text could still be selected and copied. The two things I've noticed is that text cannot be copied in the revision's diff and for relational fields' displayed value. Which was why I have asked which field are you trying to copy the text from. Revision's diff, where the text cannot be copied. Relational field's display text cannot be copied. Example below shows an O2M field. |
During creation of screenshots, I noticed that I was not aware of important details. Sorry for any confusion... The problem affects only the code editor. Readonly fields are affected the same as fields not having writing permissions, but only for the code editor. The problem is not limited to CTRL-c, any way of copying is affected: CTRL-c, Linux-style copying by selecting, as well as right-klick, which does not even show the option to copy. Tested on Linux/Chrome, Linux/Firefox and Windows/Firefox. How to reproduce:
Thank you very much again! |
@DL1PZ I was able to reproduce the issue. Thank you for the additional info and screenshots. |
Preflight Checklist
Describe the Bug
When trying to select text from a text field which is disabled, the text is not copied to the clipboard.
To Reproduce
Open a collection entry for that you don't have writing permissions. Select some text from a field and press CTRL-c. Paste your clipboard to another window.
Same for any text field when opening an old revision of a collection entry.
Errors Shown
No response
What version of Directus are you using?
9.5.1
What version of Node.js are you using?
17.3.1
What database are you using?
PostgreSQL 13.5
What browser are you using?
Firefox, Chrome
What operating system are you using?
Linux, Windows
How are you deploying Directus?
npx
The text was updated successfully, but these errors were encountered: