On Page Load -> Set Focus On Moves Screen up and left on iOS

Austin Brown shared this problem 5 years ago
Solved

When I build out "On Page Load -> Set Focus On Input_1" and test on an iOS device, the field focuses on page load, but the page moves up 40 or 50 pixels immediately after it focuses. Page Loads, Focus Appears on Input, page scrolls up while blinking cursor stays in place straddling the bottom edge of the input box. Keyboard appears as it should.


Also, hitting the return button on the keyboard does not submit the input. Only the "done" button in the form navigator bar above the keyboard will submit it. Any ideas as to why this would be the case?


It's kind of minor, but it's very frustrating and pretty strange. It maaaaay have to do with my other post re: Screen height ≠ viewport height ≠ prototype height , but I'm not sure... https://www.justinmind.com/community...

Comments (5)

photo
1

The problem is the 'set focus on' also centers the scolling area to the element. We plan to split both actions in the next updates.

photo
1

What do you mean "centers the scrolling area"? Vertically? Horizontally? Both?


Thanks!

photo
1

Both I'm afraid.

photo
1

In the nex updates, would there be a way to focus something without moving it? I mean, iOS doesn't move the content on the screen in all cases on focus.

photo
1

Sure.