Bug 274654 - Transformed button can not be clicked
Summary: Transformed button can not be clicked
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 17
Hardware: iPhone / iPad iOS 17
: P2 Major
Assignee: Nobody
URL:
Keywords: 3DTransformInterop, BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-05-24 07:45 PDT by Krystof T
Modified: 2024-05-28 12:18 PDT (History)
6 users (show)

See Also:


Attachments
Repro case. Click on the button, check console or observe alert. (1.52 KB, text/html)
2024-05-24 07:45 PDT, Krystof T
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krystof T 2024-05-24 07:45:38 PDT
Created attachment 471496 [details]
Repro case. Click on the button, check console or observe alert.

## What is broken:
A button can't be clicked when multiple parent nodes have CSS transform property.
Adding `pointerdown` listener to all the elements reveal that the last element (button #projected) doesn't receive any event. 

I SPECULATE: that the visual is different then the interaction mask.

## How to reproduce:
I attach a clear HTML repro case where on Safari clicking the button doesn't pop the alert. 
Note: CSS Style is in head

## More Context:
This html is the result of Three.js's CSS3DRenderer feature which puts html into a 3D perspective matching the engine's perspective camera.
It utilizes 2 wrapper objects (#A, #B) with two `transform: matrix3d()` and other CSS translation properties.

## Reproduced in:
- Safari iOS 17.5.1 (21F90)
- iOS Chrome (125.0.6422.80)
- iOS Firefox (126.1 (41973))

## Works correctly in:
- Android Chrome (125.0.6422.52)
- Android Firefox (124.1.0)
- Windows Chrome (125.0.6422.77)
- Windows Firefox (126.0)

## Unconfirmed:
- Playwright's Webkit (Playwright 1.44.1) -> There it transformed the button out of the screen.
- Safari OS X -> A friend confirmed that it doesn't work for him. Unsure what OS version.
Comment 1 Ahmad Saleem 2024-05-24 08:53:54 PDT
I am able to reproduce this in Safari 17.5 where click was not registered while Chrome Canary 127 and Firefox Nightly 128 are working fine and register click.

Marking this as 'BrowserCompat'.
Comment 2 Radar WebKit Bug Importer 2024-05-24 08:54:06 PDT
<rdar://problem/128684292>
Comment 3 Alexey Proskuryakov 2024-05-27 10:39:27 PDT
Probably a dupe of one or more bugs that I'm relating.
Comment 4 Abrar Rahman Protyasha 2024-05-28 12:18:15 PDT
We should be able to write a WPT for this.