Bug 225561 - REGRESSION (iOS 14.5): Setting pointer-events: none on parent, text child still accepts touch events until repaint
Summary: REGRESSION (iOS 14.5): Setting pointer-events: none on parent, text child sti...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-08 13:01 PDT by JP
Modified: 2021-07-19 07:03 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JP 2021-05-08 13:01:16 PDT
Hello all,

Problem: In iOS 14.5, dynamically setting pointer-events: none on a parent div still lets through touch events from text child.

Scenario:
1. Imagine you have a parent div that contains a child div with text.
2. In a touchend handler on the parent, you set pointer-events: none to the parent so it stops accepting further touch events
3. Tapping on the text of a child div still lets through touch events to the parent which is not desireable and which wasn't the case in iOS 14.4
4. Repainting the text child "fixes" this and correctly stops the child from letting through touch events.

https://codepen.io/conipo/pen/JjWoxmO
Comment 1 JP 2021-05-10 01:10:27 PDT
Note: This is also the case in macOS 11.3.1, i changed the codepen to also allow mouse events. Then it's also reproducible on Desktop Safari (Version 14.1 (16611.1.21.161.6))
Comment 2 Radar WebKit Bug Importer 2021-05-10 14:53:01 PDT
<rdar://problem/77790142>
Comment 3 JP 2021-06-02 13:29:40 PDT
Is there any news on this? The bug still persists in Safari Version 14.1.1 (16611.2.7.1.4) and iOS 14.6