Last Comment Bug 346694 - getComputedTextLength() ingnores space as last character
: getComputedTextLength() ingnores space as last character
Status: RESOLVED DUPLICATE of bug 319786
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: x86 Windows XP
-- normal (vote)
: ---
Assigned To: General SVG Bugs
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on:
Blocks: 934525
  Show dependency treegraph
Reported: 2006-07-31 10:14 PDT by Holger Will
Modified: 2013-11-04 10:14 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

a simple SVG textbox. (2.18 KB, application/xml)
2006-07-31 10:17 PDT, Holger Will
no flags Details

Description User image Holger Will 2006-07-31 10:14:29 PDT
if the last character of a text is a space character, it gets ignored by getCoputedTextLength()
Comment 1 User image Holger Will 2006-07-31 10:17:32 PDT
Created attachment 231431 [details]
a simple SVG textbox.

open the file and click in the textbox, then enter a space followed by any character, see what happens with the text cursor while doing so.
Comment 2 User image Robert Longson 2006-07-31 10:22:31 PDT
Actually we just don't handle xml:space="preserve" so terminal spaces are compressed to nothing.

*** This bug has been marked as a duplicate of 319786 ***
Comment 3 User image Holger Will 2006-07-31 10:31:24 PDT
no, its not the xml:space bug, as you can see if you enter one space, its still part of the string, if you enter one character after the space, the curser jumps two character forward, and the space is there, i think xml:space is just for collapsing or not collapsing multible spaces to just one space. its not general string normalization.
the xml:space is another bug with this textbox, but you can delete it from the file and the bug stays the same.
do you mind if i reopen the bug ?
Comment 4 User image Holger Will 2006-07-31 10:35:59 PDT
oh, forget what i just posted,i just read up on xml:space , you are in fact right, 
this is the same as the xml:space bug, sorry !

Note You need to log in before you can comment on or make changes to this bug.