Closed Bug 1418309 Opened 7 years ago Closed 7 years ago

Unexpected line-break before following period when link is hovered [was: Link Rendering wrong]

Categories

(Core :: Layout: Text and Fonts, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1283222

People

(Reporter: till, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171112125346

Steps to reproduce:

I visited 
https://github.com/kubernetes/kubernetes/issues/44954#issuecomment-342237698
with firefox 57.0 on macos 10.12.6.



Actual results:

The link kubernetes/federation#132 gets marginally smaller when I hover it with the mouse pointer. The link then jumps to previous line and I cannot click it.


Expected results:

I expect the link to stay in place, so it is clickable.

Please note that the attached image contains _two_ screenshots.
The red dots indicate the position of the mouse when the two screenshots were taken.
zoom level is 100%
Does happen with no extensions enabled.
Regression confirmed. Doesn't happen with 56.0.2
Component: Untriaged → Layout
Product: Firefox → Core
Component: Layout → Layout: Text
I think the root of the issue isn't actually that the link gets smaller when hovered, but that a line-break is allowed between the text of the link and the following period. When the link isn't hovered, no line-break is allowed there, and the entire link+period wraps to the next line; but for some reason, on hover, a line-break is introduced and now the link (without the period) fits on the previous line.
This is not actually a new regression in Firefox 57; it doesn't reproduce in 56 only because the text renders with a slightly different width, and so the element width doesn't happen to exactly hit the "sweet spot" between the link text and the following period. But if I use the Inspector to set padding-right:9px on the <td> element that contains the comment, instead of the 15px it has in the page's stylesheet, then the behavior reproduces in 56.0.2 as well; so the issue with the unexpected line-break (only when the link is hovered) was present in that version as well.

So if it's a regression, it dates back further than 56.0.2; or maybe this bug has always been present.
Summary: Link Rendering wrong (regression in 57.0?) → Unexpected line-break before following period when link is hovered [was: Link Rendering wrong]
Reduced testcase:

  data:text/html,<style>div{background:silver;font:16px monospace;width:14ch}
                        a{position:relative} a::after{position:absolute;display:none;content:""}
                        a:hover::after{display:inline-block}</style> <div>this is a <a href="">test</a>.

and hover over the link "test".

The issue is that the abs-pos element introduced between the link and the following period causes a line-break opportunity.

So I believe this is the same issue as bug 1283222.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: