Open
Bug 1343052
Opened 8 years ago
Updated 2 years ago
Box Model, Grid Inspector and other highlighters can be slightly misaligned if the page has scrolled
Categories
(DevTools :: Inspector, defect, P3)
DevTools
Inspector
Tracking
(Not tracked)
NEW
People
(Reporter: zer0, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [designer-tools])
Box model, Grid Inspector and other highlighters that are positioned absolutely in the page, can be slightly misaligned if the page has scrolled.
That can happens only if the page has zoomed as well, or in a display with higher density (such retina).
That's due the fact that properties such `scrollX` and `scrollY`, used to positioned the highlighters don't have subpixel precision; but mouse's wheel has actually subpixel precision – as result, we can scroll between pixels, but we can't understand that we're in a subpixel from those properties.
Reporter | ||
Updated•8 years ago
|
Blocks: 1187970, devtools/highlighters
Depends on: 1151421
Reporter | ||
Comment 1•8 years ago
|
||
I was playing a bit with `documentElement.getBoundingClientRect()`, that supports subpixel precision, but unfortunately is not reliable in the edge case where the root element is styled with margin, or positioned.
Updated•8 years ago
|
Priority: -- → P3
Comment 2•7 years ago
|
||
When the page starts off without any scrollbars, and triggering the grid overlay causes the page to overflow and display scrollbars, grids at the right edge get offset by the scrollbar width.
Video: https://i.imgur.com/QCeXUeE.gifv
Screenshot: https://i.imgur.com/ebWwC1K.png
Whiteboard: [designer-tools]
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•