chenbo007 / svg-edit

Automatically exported from code.google.com/p/svg-edit
0 stars 0 forks source link

Blank "text" field deactives the Selection tool #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Draw any shape
2. Add a text (e.g. the default "text" word)
3. Go in the field where "text" is and blank it
4. Try to select the firstly drawn shape

What is the expected output? 
Selecting the shape

What do you see instead?
The selection tool stops working

In what browser did you experience this problem? (ALL, Firefox, Opera 10
Alpha, etc)

OS: Windows XP1

Browsers:
- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre)
Gecko/20090415 Shiretoko/3.5b4pre
- Opera Version 10.00 Beta 3 Build 1699

Please provide any additional information below.

Original issue reported on code.google.com by worms_...@yahoo.com on 17 Aug 2009 at 8:12

GoogleCodeExporter commented 9 years ago
Interesting - I haven't seen this on Firefox 3.5 on OSX.  Will test elsewhere.

Original comment by codedr...@gmail.com on 17 Aug 2009 at 8:43

GoogleCodeExporter commented 9 years ago
This also happens on Ubuntu.
This does not happen in OSX.  

On Firefox Ubuntu, I get:

Error: [Exception... "Component returned failure code: 0x80004005 
(NS_ERROR_FAILURE)
[nsIDOMSVGLocatable.getBBox]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  
location:
"JS frame :: http://svg-edit.googlecode.com/svn/trunk/editor/svgcanvas.js ::
anonymous :: line 2078"  data: no]
Source File: 
http://svg-edit.googlecode.com/svn/trunk/editor/svgcanvas.jsHowever, this 

Original comment by codedr...@gmail.com on 17 Aug 2009 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 17 Aug 2009 at 8:51

GoogleCodeExporter commented 9 years ago
Fixed in r447.

The error occured the moment it tries to get the BBox of an empty text element. 
I
fixed this by pretending there's a character there anyway for the purpose of 
getting
the BBox values, then making it empty again.

Original comment by adeve...@gmail.com on 21 Aug 2009 at 8:14