Andrei Nestser
Andrei Nestser

Reputation: 374

Textarea behaviour in iframes on iPad

It is know bug about that fact that textarea and inputs do not work properly on iPad Safari if they are placed inside iframe

Here is more info about it: https://bugs.webkit.org/show_bug.cgi?id=133044

Actually it work on iOS 8, but on iOS 7 this bug is easy to reproduce.

But despite of this - I need to find some working solution for this.

I tried to add touchstart event handlers on parent (how it advised), same to mouseup, touchmove events - nothing works

Maybe somebody knows any working solution for this?

Thanks

Upvotes: 0

Views: 352

Answers (1)

MaleficentMedia
MaleficentMedia

Reputation: 11

I've had this problem for days and from googling around most of the internet has too. But none of the posts contained an answer. This is the solution that worked for me. It's based on https://gist.github.com/tamarasaurus/dcf2d0331043586421f3. Hopefully this will help people in the future, or at least point them in the right direction.

document.addEventListener('keydown', function(e) {
    window.focus();
});

document.addEventListener('touchend', function(e) {
    window.focus();
});

Upvotes: 1

Related Questions