Closed Bug 360869 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: SVG, defect)

1.8 Branch
x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: doug, Assigned: tor)

Details

(Keywords: fixed1.8.1.1)

Attachments

(2 files)

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
WFM with latest firefox trunk build. Broken in firefox 2.0 though.
Assignee: general → tor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Trunk → 1.8 Branch
Attachment #246072 - Flags: review?(longsonr)
Attachment #246072 - Flags: review?(longsonr) → review+
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+
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?
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1? → blocking1.8.1.1+
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+
Checked in on MOZILLA_1_8_BRANCH.
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: fixed1.8.1.1
Resolution: --- → FIXED
*** 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.