Closed Bug 1713545 Opened 3 years ago Closed 4 months ago

RDM with touch events sends SetCapture warning in the console

Categories

(DevTools :: Responsive Design Mode, defect, P3)

defect

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: karlcow, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

What were you doing?

  1. Open Firefox, activate RDM with a Mobile UA and touch activated.
  2. Go to https://www.mozilla.org/en-US/
  3. Click on a link.

What happened?

The following message appears in the console.

Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture

What should have happened?

Nothing probably

This refers to
https://searchfox.org/mozilla-central/rev/5977b6fdebe32451ada35fa2cbd7c0752cfea982/devtools/server/actors/emulation/touch-simulator.js#217-219

which is calling

https://searchfox.org/mozilla-central/rev/5977b6fdebe32451ada35fa2cbd7c0752cfea982/testing/marionette/harness/marionette_harness/www/shim.js#278-288

Anything else we should know?

Probably not urgent.

Severity: -- → S3
Priority: -- → P3
Blocks: rdm-touch

We've received a report in https://github.com/webcompat/web-bugs/issues/107300 about this issue. The warning message could be misleading for developers as it makes you believe that the issue is with the actual code and not RDM.

Duplicate of this bug: 1739820
Duplicate of this bug: 1799605
Duplicate of this bug: 1835768
Duplicate of this bug: 1866301

The message was added in Bug 777972 (see https://hg.mozilla.org/mozilla-central/diff/8b82a374ece51b3d874bbc41db97ef5b2e0c5026/browser/devtools/shared/touch-events.js)

evt.target.setCapture was used to make sure events are not dispatched to something else, for example a different window.
We could replace this with evt.target.setPointerCapture, but there is no test covering this, and trying to make appear an overlapping
element still only dispatch the element to the original target, so we can probably remove this just fine.

evt.target.setCapture is deprecated and displays a message to the console.
it was used to make sure events are not dispatched to something else, for
example a different window.
We could replace this with evt.target.setPointerCapture,
but there is no test covering this, and trying to make appear an overlapping
element still only dispatch the element to the original target, so we can
probably remove this just fine.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51420a723cbc [devtools] Remove deprecated (and unecessary?) setCapture call in touch simulator. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: