Bug 153224

Summary: Tapping into an <input> within a position:fixed element scrolls to the top of the page
Product: WebKit Reporter: Chris Rebert <webkit>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: aklapec, cdemars86, simon.fraser, touko.vk, zalan
Priority: P2 Keywords: HasReduction, InRadar
Version: Safari 9   
Hardware: iPhone / iPad   
OS: iOS 10   
URL: http://output.jsbin.com/qicigu/1
Bug Depends on:    
Bug Blocks: 159753    

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.