Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
copy-paste disable for TextField
Hi Everyone,
I am using vaadin 7.x. I want to disable paste event for a text field. I am not able to find any option to do same. Please help me, anyone.
Context:
The amount, confirm amount two fields are there, now I want to disable paste event on confirm amount field. I want to force the user to enter confirm amount through keyboard only.
Thanks in advance.
Thanks and Regards,
Nagendra Kumar M,
10i e-commerce Pvt. ltd.,
Bangalore, India.
That is not possible to do on the server side. However, by making a custom version of the text field it should be possible, see https://vaadin.com/docs/-/part/framework/gwt/gwt-overview.html on how that is done. See this old link for how the event is then disabled on the client-side: https://coderanch.com/t/515153/framework/Disable-Copy-Paste-Textbox.
-Pontus