Float: right; on a link in a table changes display when the link is clicked

RESOLVED DUPLICATE of bug 318540

Status

()

RESOLVED DUPLICATE of bug 318540
13 years ago
13 years ago

People

(Reporter: mkimmerly, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

If you define a link with spaces in the text and use a .css class that has the float attribute set to right, clicking the link does not redirect the browser to the target, but instead changes the spaces in the link text to line breaks.

Reproducible: Always

Steps to Reproduce:
1. Load the attached .html file into firefox 1.5
2. Click on the "Click me to go to Google" link
3. Observe the text rearrangement, and the browser does not go to Google.  (Clicking a second time does redirect the browser)

Actual Results:  
Link text is broken into separate lines after each space in the text and the browser is not redirected.  A second click on the rearranged text causes the link to be followed.

Expected Results:  
The link text should not change, the browser should be redirected.
(Reporter)

Comment 1

13 years ago
Created attachment 210342 [details]
Simple HTML page that demonstrates the bug.

Load this page into Firefox 1.5 and click the link
Attachment #210342 - Attachment mime type: image/gif → text/html
Created attachment 210345 [details]
Better testcase

Reproducible on:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Better testcase attached.
Attachment #210342 - Attachment is obsolete: true
Created attachment 210347 [details]
Testcase

Argh. What I meant to attach was this, I guess.

The first link has float: right; (which displays the problem in question), the second one has float: left; (and works).
Attachment #210345 - Attachment is obsolete: true
Reproducible on
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060201 Firefox/1.6a1

Confirming, moving to Core...
Status: UNCONFIRMED → NEW
Ever confirmed: true
In doubt whether this is Layout: Tables or Layout: Floats. Please change when anyone figures out the actual cause of the bug...
Component: General → Layout: Tables
Keywords: testcase
Product: Firefox → Core
Version: unspecified → Trunk
QA Contact: general → layout.tables
Summary: On clicking a link, the link text is reformatted, changing spaces to line breaks → Float: right; on a link in a table changes display when the link is clicked
This code in userContent.css can prevent the bug from happening:
a:visited { -moz-outline: 1px dotted black ! important;}

Comment 7

13 years ago
Hm, this reminds me of bug 308392 (which was IMHO incorrectly marked as a dup of bug 307387).
Regression somewhere between 11 and 18 July 2004.

Comment 9

13 years ago
Maybe related to the -moz-outline changes introduced in bug 151375?
I think this is the same as bug 318540.
Also Bug 320196. All three have in common that the links change behaviour with a dotted rectangle around them. 
The dotted rectangle, that's called the focus outline, it happens when you focus something.
Current trunk builds now cause a reflow when something gets a focus outline, see bug 261196 and bug 151375.

*** This bug has been marked as a duplicate of 318540 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(In reply to comment #12)
> The dotted rectangle, that's called the focus outline, it happens when you
> focus something.
> Current trunk builds now cause a reflow when something gets a focus outline,
> see bug 261196 and bug 151375.
> 
> *** This bug has been marked as a duplicate of 318540 ***
>
I was talking about the .css code from comment #6.
All related bugs return to normal behaviour when this code is used AND when the link is in the history.  

Yes, that's I meant with the focus outline. Although -moz-outline/outline can also be used for other purposes, Mozilla uses this property to show the dotted rectangle when focusing something.
You need to log in before you can comment on or make changes to this bug.