Clicking Design Modus returns wrong Inner or Outer Width for element by 17px.
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(Not tracked)
People
(Reporter: info, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rdm-reserve] [dt-q])
Attachments
(6 files, 1 obsolete file)
Updated•6 years ago
|
Updated•6 years ago
|
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Reporter | ||
Comment 12•6 years ago
|
||
Reporter | ||
Comment 13•6 years ago
|
||
Reporter | ||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Reporter | ||
Comment 16•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Comment 18•5 years ago
•
|
||
Some initial findings while testing this with attachment 9026896 [details] :
When we first open RDM, the viewport browser's content frame script is executed AFTER the "DOMContentLoaded" event has been fired. This means one thing: the calls to getBoundingClientRect()
, width()
, outerWidth()
, etc... are happening before we load the overlay scrollbar stylesheet. This explains the initial 15px difference.
I can observe this by either:
- putting a
console.log
in the message handler for ResponsiveMode:Start. Observe that the outer width values are being printed before the console.log. - putting breaks point at Element::GetBoundingClientRect() and nsDOMWindowUtils::LoadSheet opening RDM. Observe that the breakpoint at GetBoundingRectClient is hit before LoadSheet.
Now when the page is refreshed while in RDM, I can observe the reverse for Element::GetBoundingClientRect()
and nsDOMWindowUtils::LoadSheet
, where loading the stylesheet happens before the call to getBoundingClientRect()
. This gives us the correct values.
I think the next steps here are to track where and when the "DOMContentLoaded" event is being fired as the RDM UI is initialized. Perhaps it's possible we can apply this style sheet before the starting the frame script.
Updated•5 years ago
|
Reporter | ||
Comment 19•5 years ago
|
||
Hi FF Dev-Team Guys,
Is there any ETA when this is going to be fixed? Please advice.
Kind regards !
Updated•2 years ago
|
Description
•