react-mentions
react-mentions copied to clipboard
Unable to copy rendered text when input is readonly
Steps to reproduce:
- Render input with readonly flag set to true and any text value e.g "Hello world"
- Using your mouse highlight the visible text
- Right click on your mouse
- Select copy
- Paste anywhere eg notepad.
Expected behaviour: Pasted value is "Hello world" Observed behaviour: empty Workaround: None so far
Were you able to find a solution for this?
It's not the right way, but it can be solved with expediency.
<MentionsInput
// disabled
value={value}
spellCheck={false} // optional
style={{
...mentionsInputDefaultStyle,
control: {
caretColor: 'transparent',
},
}}
>
It looks the same as using 'disabled'.
Add a reproducible example to show the issue: https://codesandbox.io/s/react-mentions-disabled-issue-zb33x?file=/src/App.js
