Bug 257119

Summary: onpointerdown event not firing on position: fixed elements at certain scroll position
Product: WebKit Reporter: shuangqiu2
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: a_protyasha, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: Other   
Attachments:
Description Flags
screen recording of the reproduction none

Description shuangqiu2 2023-05-22 04:52:04 PDT
Created attachment 466446 [details]
screen recording of the reproduction

Tapping an element doesn't fire the pointer down event in this setup:
  1. The button itself has "position: fixed" set
  2. The ancestors have "height: 100%" set
  3. The page has a viewport meta tag set (seems to happen only on a small-ish viewport width. If I set the width to 1200, it works testing on an ipad mini)

You could find the reproduction sandbox here: https://codesandbox.io/s/young-moon-4uhybj?file=/public/index.html. 

Attached is a video of my reproduction on an ipad mini with iPadOS 16.3.1: the button has an onpointerdown callback that will update the number on the button. When I scroll to the bottom and scroll back up a bit, tapping doesn't update the value until I scroll to a different position.

It works if I change one of the conditions above, or if I use onclick instead.
Comment 1 Radar WebKit Bug Importer 2023-05-22 12:09:46 PDT
<rdar://problem/109671417>
Comment 2 shuangqiu2 2023-05-23 06:28:57 PDT
> 2. The ancestors have "height: 100%" set

Just tested with the sandbox again, the same bug persists with the 100% height removed as well.