Closed Bug 1534562 Opened 5 years ago Closed 5 years ago

setPointerCapture on element in shadow DOM produces InvalidStateError

Categories

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

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: luki.schaer, Assigned: smaug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36

Steps to reproduce:

  • Open the attached .html file in Firefox.
  • Click the red square to trigger the onpointerdown function attached to the innerDiv
    -> This triggers the function that calls setPointerCapture

Actual results:

An InvalidStateError is produced and logged to the console (An attempt was made to use an object that is not, or is no longer, usable)

Expected results:

The function call should be allowed and not produce this error, as it seems to be allowed according to this specification[1]: there is no PointerLock, and the innerDiv is connected.

[1] https://w3c.github.io/pointerevents/#setting-pointer-capture

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Assignee: nobody → bugs
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

FWIW, this is a change in pointer events v2. We seem to follow v1 here.

Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc090db10bec
setPointerCapture should work also in Shadow DOM, r=masayuki
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: