The default bug view has changed. See this FAQ.

text-anchor='middle' does not work with text content added via certain scripts

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Doug Schepers, Assigned: tor)

Tracking

({fixed1.8.1.1})

1.8 Branch
x86
Windows XP
fixed1.8.1.1
Points:
---
Bug Flags:
blocking1.8.1.1 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

text-anchor='middle' doesn't center text that is added to an element if it is the result of mouse events (rather than load events, for example, oddly enough).  Text that is in place when the document is parsed works fine, as does text added via the same script called onload instead.

Reproducible: Always

Steps to Reproduce:
1. create empty static text element
2. add text via script evoked by click 
3. text is not centered

Actual Results:  
Text is not centered

Expected Results:  
Text should be centered
(Reporter)

Comment 1

11 years ago
Created attachment 245733 [details]
illustrates how text isn't centered... click on red dot to activate

Comment 2

11 years ago
WFM with latest firefox trunk build. Broken in firefox 2.0 though.
(Assignee)

Updated

11 years ago
Assignee: general → tor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Trunk → 1.8 Branch
(Assignee)

Comment 3

11 years ago
Created attachment 246072 [details] [diff] [review]
branch patch - missing chunk from bug 307155
Attachment #246072 - Flags: review?(longsonr)

Updated

11 years ago
Attachment #246072 - Flags: review?(longsonr) → review+
(Assignee)

Comment 4

11 years ago
Comment on attachment 246072 [details] [diff] [review]
branch patch - missing chunk from bug 307155

While if writing new code I'd use IsEmpty() and shuffle the code in the method a bit, I figured it was best to keep this as close to the shipping ff1.5 as possible.
Attachment #246072 - Flags: superreview?(roc)
Attachment #246072 - Flags: superreview?(roc) → superreview+
(Assignee)

Comment 5

11 years ago
Comment on attachment 246072 [details] [diff] [review]
branch patch - missing chunk from bug 307155

Important fix for a regression between Firefox 1.5 and 2.0.  This same fix has been on the 1.8.0 branch for over a year.
Attachment #246072 - Flags: approval1.8.1.1?
(Assignee)

Updated

11 years ago
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1? → blocking1.8.1.1+

Comment 6

11 years ago
Comment on attachment 246072 [details] [diff] [review]
branch patch - missing chunk from bug 307155

Approved for 1.8.1 branch, a=jay for drivers.  Please land this asap, thanks!
Attachment #246072 - Flags: approval1.8.1.1? → approval1.8.1.1+
(Assignee)

Comment 7

11 years ago
Checked in on MOZILLA_1_8_BRANCH.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1.1
Resolution: --- → FIXED
(Assignee)

Comment 8

11 years ago
*** Bug 362659 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.