HomeiOS Developmentios - Textual content information from clipboard occasion is empty for paste...

ios – Textual content information from clipboard occasion is empty for paste occasions executed by way of Apple Common Clipboard


I used to be making an attempt out react-otp-input and through testing, I copied the OTP I obtained by way of electronic mail from my iPhone, and pasted it on the OTP Enter (React utility, in dev mode, working on Chrome 121.0.6167.139 (Official Construct) (arm64), Apple M2 Chip).

However the OTP was not pasted.

So I went on to attempt the identical with an strange HTML ingredient, which succeeded, however after I tried to entry the textual content from the Clipboard occasion as follows

<enter onPaste={(e) => console.log(e.clipboardData.getData("textual content"))} />

The consequence was an empty string, as follows

Image of the console where the clipboard event's getData was logged

I researched fairly a bit, however discovered nothing of a lot use. I might recognize any information on this (rationalization, workaround and so on.). Thanks upfront.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments