'Handle validation jquery after paste event in mobile device

I wrote this code :

$("input").on("paste", async function () {
        await sleep(100);
    });
// Copy paste delay
function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

On desktop, it works but on mobile, paste doesn’t work (I mean validation doesn’t work when I paste in input). How do I make it work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source