user3476345
user3476345

Reputation: 331

Safari mobile text input issues

This issue happens on my iPhone 6 plus. This issue does not occur on my iphone 5C.

On one of my pages I have an overlay div with a fixed position that is shown when a button is pressed, and on that div there are a few inputs. The overlay div is scrollable to be able to fit all of the inputs. There are a couple of strange things happening when typing in said inputs.

None of this happens on the desktop/"full" version nor on mobile chrome.

Is this a known issue? I had a problem that caused the background to scroll but not the div, until I added this

 -webkit-overflow-scrolling: touch;

Here's the form, the data-binding is for knockout.js

<label class = "overlay_div_label" for ="name">Name</label>
<input type = "text" class = "overlay_div_input" data-bind = "value: name"/>

<label class = "overlay_div_label" for ="email">email</label>
    <input type = "text" class = "overlay_div_input" data-bind = "value: email"/>

<label class = "overlay_div_label" for ="city">City</label>
    <input type = "text" class = "overlay_div_input" data-bind = "value: city"/>

<label class = "overlay_div_label" for ="contactTime">Contact Time</label>
    <input type = "text" class = "overlay_div_input" data-bind = "value: contactTime"/>

Upvotes: 0

Views: 3427

Answers (2)

Sams
Sams

Reputation: 694

I had the same issue. When someone is typing in the input all divs and inpust around that input just disappear. My fix was to add position:relative; to the form tag.

Upvotes: 1

Carlos Ladd
Carlos Ladd

Reputation: 1

Review your all CSS and make sure not contain any of these tag/tricks

-webkit-transform: translateZ(0px);
-webkit-transform: translate3d(0,0,0);
-webkit-perspective: 1000;

But if your problem persist, try change.

-webkit-overflow-scrolling: auto;

Or you can assign z-index for the div element.

I hope I helped.

Upvotes: 0

Related Questions