Bug 153224 - Tapping into an <input> within a position:fixed element scrolls to the top of the page
Summary: Tapping into an <input> within a position:fixed element scrolls to the top of...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 9
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
URL: http://output.jsbin.com/qicigu/1
Keywords: HasReduction, InRadar
Depends on:
Blocks: 159753
  Show dependency treegraph
 
Reported: 2016-01-18 23:13 PST by Chris Rebert
Modified: 2016-11-07 01:51 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rebert 2016-01-18 23:13:51 PST
iOS version: 9.2
Testcase: http://output.jsbin.com/qicigu/1
Original Bootstrap bug report: https://github.com/twbs/bootstrap/issues/17497

Steps to reproduce:
1. Open http://output.jsbin.com/qicigu/1 in iOS Safari.
2. Scroll to the bottom of the page.
3. Tap the "Open modal" button.
4. A yellow overlay appears.
5. Tap on the <input> that has the text "Click here".

Actual result:
The page scrolls to the top, the input becomes focused, and the on-screen keyboard appears.

Expected result:
The input should become focused and the on-screen keyboard should appear.
The scroll position of the page should not change.
Comment 1 Chris Rebert 2016-01-18 23:16:22 PST
No such scrolling occurs in Android Chrome or OS X Safari.
Comment 2 Chris Rebert 2016-01-19 00:23:13 PST
<rdar://problem/24235301>
Comment 3 Chris Rebert 2016-01-22 01:20:02 PST
<rdar://problem/19708696>
Comment 4 Chris DeMars 2016-02-10 06:36:33 PST
After you fill out the input and hit done the focus shifts to the background, modal stays up, and the background scrolls.