pupsnow / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

SVG Web Issue: text event, or pointer event problems #649

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try implement  something like:
    .textSnapshot.findText(0, 'abc', false) 
    .textSnapshot.getSelectedText()

    as can be seen here for text selection: 
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/text/TextSnapshot.html

2. Try in your SVG loadhander something like:
    trace('find string iIN SVG: ' + evt.parent.textSnapshot.findText(0, 'abc', false) ); // returns -1
    trace('find string count IN SVG: ' +evt.parent.textSnapshot.charCount ); // returns 0

    evt.parent.textSnapshot.setSelectColor(0x8A4862);
    evt.parent.textSnapshot.setSelected(0, 4, true);
    trace('1) find iIN SVG: ' + evt.parent.textSnapshot.getSelectedText(false) ); // nothing happens

What is the expected output? What do you see instead?
  a) I expect the text in the SVG to be selectable.
  b) I expect the evt.parent.textSnapshot.getSelectedText(false)
      to return the text selected instead it returns nothing.

  c) I expect the text set as selected in the SVG to be highlighted with colour:
    evt.parent.textSnapshot.setSelectColor(0x8A4862);
    evt.parent.textSnapshot.setSelected(0, 4, true);

What version of the product are you using? On what operating system,
browser, and version of Flash?
Using on Mac OS X, version 10.6.8
checked on Google Chrome browser Version 21.0.1180.75

Please provide any additional information below. Reduced test cases are
always appreciated!
Details can be seen on the Adobe Forum:
http://forums.adobe.com/message/4662807#4662807

Original issue reported on code.google.com by mrkweb...@gmail.com on 31 Aug 2012 at 9:47

Attachments: