Bug 153856 - Scroll gesture in text field in position:fixed element sometimes scrolls <body> instead of scrollable ancestor on iOS
Summary: Scroll gesture in text field in position:fixed element sometimes scrolls <bod...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
Keywords: HasReduction, InRadar
Depends on:
Blocks: 159753
  Show dependency treegraph
Reported: 2016-02-04 01:22 PST by Chris Rebert
Modified: 2022-01-11 02:45 PST (History)
10 users (show)

See Also:

Testcase demonstrating the problem (8.86 KB, text/html)
2016-02-04 01:22 PST, Chris Rebert
no flags Details
GIF video demonstrating the bug (1.81 MB, image/gif)
2016-02-04 01:23 PST, Chris Rebert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rebert 2016-02-04 01:22:53 PST
Created attachment 270642 [details]
Testcase demonstrating the problem

Steps to reproduce:
1. Open the attached testcase in iOS Safari.
2. Tap the "Launch demo modal" button.
3. Tap into the 2nd text field.
4. Type some text.
5. Tap the Done button.
6. Perform a scroll-down gesture (i.e. flick your finger upward), but start the scroll gesture within the bounds of the 2nd text field.

Actual result:
The <body> scrolls downward.

Expected result:
The yellow <div> (which is a descendant of a position:fixed <div>) should scroll downward.
The <body> shouldn't scroll at all, because it's styled as overflow:hidden.

Original Bootstrap bug: https://github.com/twbs/bootstrap/issues/14839#issuecomment-60940738

This is similar to bug 153852, but that bug usually occurs only when the position:fixed element has already been scrolled to its top or bottom,
whereas this bug doesn't have that requirement and seems to be related to text fields specifically.
Comment 1 Chris Rebert 2016-02-04 01:23:46 PST
Created attachment 270643 [details]
GIF video demonstrating the bug
Comment 2 Radar WebKit Bug Importer 2016-02-05 02:23:52 PST