Open Bug 1766214 Opened 3 years ago Updated 3 years ago

Get rid of document.userHasInteracted and underlying implementation

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: edgar, Unassigned)

References

(Blocks 1 open bug)

Details

https://searchfox.org/mozilla-central/rev/13d69189a8abfc5064fe44944550b9b6eb4544f5/dom/webidl/Document.webidl#572

userHasInteracted was built before spec has a clear definition of how user activation should work, see https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation. Now there is hasBeenUserGestureActivated in document which basically serve the same purpose as userHasInteracted, but it aligns with the spec more and also support Fission nicer.

One major difference between them is that userHasInteracted treats drop event as a user interaction, but hasBeenUserGestureActivated doesn't. I checked with Blink, it treats drop event as user activation, so I think we could just also follow that, and then I would expect that we could replace the usage of userHasInteracted by hasBeenUserGestureActivated .

Blocks: 1577516

can i take this issue?

Hi Edgar, not sure if you've been working on this, so NI for comment 1 as well as additional mentoring information for moving this forward.

Flags: needinfo?(echen)

(In reply to F3n67u from comment #1)

can i take this issue?

I have done some small experiment locally, but the scope of this bug is a bit larger than I expect.
In this bug, I intent to not only remove the document.userHasInteracted from webidl, but also all underlying implementations.
It seems only password manager use the webidl, but there are multiple components interact with the underlying implementation.

We could file separated bug for each component. If you are still interested on this, we could start with removing the webidl. :)

Flags: needinfo?(echen)
Summary: Get rid of document.userHasInteracted → Get rid of document.userHasInteracted and underlying implementation
Depends on: 1766594
You need to log in before you can comment on or make changes to this bug.