Node picker doesn't work on embedded svg <object>
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
People
(Reporter: gyorokpeter1, Unassigned)
References
()
Details
Attachments
(2 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Steps to reproduce:
Extract the attached .zip and open test.html.
Open the console with F12, click on "Pick an element from the page", then click on the text element in the SVG (that reads 00:00).
Actual results:
The element is not highlighted when pointed at. Further, the inspector doesn't highlight the element after clicking on it. See actual.png.
Expected results:
The element should be highlighted in the inspector. See expected.png.
Reporter | ||
Comment 1•11 months ago
|
||
Comment 2•11 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Inspector' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•11 months ago
|
||
Comment 4•11 months ago
|
||
Comment 5•11 months ago
|
||
I'll set up a proper test case so we can investigate
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Comment 6•11 months ago
|
||
For the node picker part, in https://searchfox.org/mozilla-central/rev/7bbc54b70e348a11f9cd12071ada2cb47c8a14e3/devtools/server/actors/highlighters/utils/markup.js#689,693,699-700
function moveInfobar(container, bounds, win, options = {}) {
...
const { computedStyle } = container;
...
const containerHeight = parseFloat(computedStyle.getPropertyValue("height"));
const containerWidth = parseFloat(computedStyle.getPropertyValue("width"));
computedStyle.getPropertyValue("height")
and computedStyle.getPropertyValue("width")
are returning "auto"
, which creates a NaN
when calling parseFloat
on it, and messes up with the style we set on the highlighter.
Comment 7•11 months ago
|
||
Updated•11 months ago
|
Description
•