Bug 257119 - onpointerdown event not firing on position: fixed elements at certain scroll position
Summary: onpointerdown event not firing on position: fixed elements at certain scroll ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-22 04:52 PDT by shuangqiu2
Modified: 2023-05-23 06:28 PDT (History)
4 users (show)

See Also:


Attachments
screen recording of the reproduction (533.36 KB, video/quicktime)
2023-05-22 04:52 PDT, shuangqiu2
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.