Is there any way to disable clipboard for Textinput so that user can not copy or paste text. Or any way to detect copy/paste clipboard event in react native. Note : caretHidden=true and contextMenuHidden=true are not working fine.
Asked
Active
Viewed 2,756 times
1
-
if you don't need longclick you can set longclickable to false for the edittext. otherwise you need to set CustomSelectionActionModeCallback – Karan Harsh Wardhan Feb 12 '19 at 09:17
1 Answers
1
Try clearing the clipboard inside that view. Add this inside render()
Clipboard.setString('');
Edit
<TextInput onFocus={() => Clipboard.setString('')} onSelectionChange={() => Clipboard.setString('')}/>

Harikrishnan
- 9,688
- 11
- 84
- 127
-
-
It is working fine But i want to disable clipboard because i do not want the user to copy the sensitive value from clipboard.In current scenario we are clearing the copied clipboard. Applications like "Clipboard Manager" easily log the the value whenever user copy text from clipboard although we have cleared the clipboard.Is there any way the copy/paste does not appear on long press or double press – Arain001 Feb 12 '19 at 10:43
-
Even if we disable copy (clipboard), user still can grab the sensitive info displayed on screen just by taking screenshot. – Harikrishnan Feb 12 '19 at 11:19
-