New issue
Advanced search Search tips

Issue 749507 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Focus rectangle on <img> has padding at bottom

Reported by hu...@opera.com, Jul 27 2017

Issue description

Chrome Version: ToT and way back.
OS: Linux and Mac and maybe others.

What steps will reproduce the problem?
1. <a href=""><img src="" width="40" height="40"></a>
2. Use TAB-key to focus the <img>
3. Notice rectangle around <img>.

What is the expected result?
Rectangle is 40x40 pixels.

What happens instead?
Rectangle is ~40x50 pixels.

Bug reproduces in content_shell.
 
img_focus_rectangle_bug.png
15.9 KB View Download
Labels: BugSource-Chromium PaintTeamTriaged-20170731
Project Member

Comment 2 by sheriffbot@chromium.org, Aug 1

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Still happens.
Labels: Hotlist-GoodFirstBug
Status: WontFix (was: Available)
I think this is the expected result due to how replaced-inline aligns with line-height. For example:
<a href="" style="background: lightblue;"><img src="" style="background: lightgreen;" width="40" height="40"></a>
This renders the same in Chromium, Safari, Firefox, and Edge.

Happy to re-open if needed but I think we should close this as WONTFIX.
I see a difference between FF and Chrome:
firefox_has_a_tighter_box.gif
53.8 KB View Download
Here's the example from comment 5: https://output.jsbin.com/buwiqew/quiet

Did you try my example? I think it explains what is going on. Firefox is incorrectly ignoring the text baseline for focus rectangles on images if there is no text content.

Focus rectangles aren't spec'd so I'm not sure there is a firefox bug here, just an inconsistency with how things like outline are drawn.
I see now, thanks!

Sign in to add a comment