Open Bug 1435948 Opened 3 years ago Updated 2 years ago

s-pen strange events


(Core :: DOM: Events, defect, P3)

58 Branch





(Reporter: brooke, Unassigned)



User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180131010234

Steps to reproduce:

Device: Samsung Galaxy S-pen; Firefox 58.0.1 for Android

It supports hover when the S-pen is within 1cm above the touch surface.

Test was done with the following HTML element (textarea):-

<textarea style='touch-action:none;' onpointerenter='myenter(this);' onpointerleave='myleave(this);' onpointerdown='mydown(this);' onpointerup='myup(this);' onfocus='myfocus(this);'></textarea>

Actual results:

When I put the S-pen down and up on the textarea, the following events were fired.

1)	onpointerenter, pointerType=mouse, gettime()=1517893846527
2)	onpointerdown, pointerType=touch, gettime()=1517893847206 (679ms)
3)	onpointerup, pointerType=touch, gettime()=1517893847638 (432ms)
4)	onpointerleave, pointerType=touch, gettime()=1517893847640 (2ms)
5)	onpointerenter, pointerType=mouse, gettime()=1517893847668 (28ms)
6)	onpointerfocus, gettime()=1517893847790 (122ms)

When I put the S-pen down on the textarea for over a second before up, the following events were fired.

11)	onpointerenter, pointerType=mouse, gettime()=1517898489483
12)	onpointerdown, pointerType=touch, gettime()=1517898489760 (277ms)
13)	onpointerleave, pointerType=touch, gettime()=1517898490852 (1092ms)
14)	onpointerenter, pointerType=mouse, gettime()=1517898492542 (1690ms)

Expected results:

All pointerTypes should be 'pen'.

Event (6) should be fired after (2).

Event (5) should not be fired.

Event (14) should not be fired.

Event onpointerfocus should be fired after (12).
Sorry Andrew, I was unsure if we (DOM) handle the platform specific events for Android or not (including input types). As such, I'm not sure who to bounce this to.
Flags: needinfo?(overholt)
Hmm, getting pointer events on Android?
and even on FF58, when pointer events weren't enabled even on Desktop.
Did you enable dom.w3c_pointer_events.enabled yourself?
I've added a dependency here on the "ship Pointer Events on Android" bug. No work is presently happening there AFAIK.
Depends on: 1426786
Flags: needinfo?(overholt)
Priority: -- → P3
Blocks: 1507495
No longer depends on: 1426786
You need to log in before you can comment on or make changes to this bug.