On Sun, 27 Mar 2011 07:31:13 +0200, Doug Schepers <d...@schepers.cc> wrote:

> Hi, Andreas-
>
> Andreas wrote (on 3/26/11 10:40 AM):
>> Text selection works fine in any browser (yes in Fox4 too, but you  
>> can't see the selection).
>
> I can't select discrete runs of text in FF4. I can only do select-all.
> Am I missing something?
>
>
>> In some tests, it seems to me, that text in a<use>  can't select, but  
>> in Fox. Is this right?
>
> I could argue it either way.  This aspect of the shadow-DOM is murky.
>
> While I see the desirability of text-selection in <use>, I could also
> see why the text would simply be treated as a visual representation
> within a <use> element, and not be selectable.  <tref> should be
> selectable, but that isn't yet implemented in FF.
>
> The spec is totally underspecified on this point.

Yes, http://www.w3.org/TR/SVG11/text.html#TextSelection doesn't mention  
shadowtrees and consequently there's no such test in the svg testsuite  
either.

> FF and Opera don't allow text selection in <use>.  WebKit (Safari,
> Chrome) do.  Opera and WebKit allow text selection of <tref>.  I haven't
> yet tested IE9 for any of this.

It's a little bit more work to deal with <use> for selections, but from a  
user experience point-of-view it might make sense to allow it.

> The most interesting behavior around text selection is Opera 11... when
> you select the original text, the <use>d text also shows the selection
> rendering.  Kinda cool.  Lends itself to the argument that the effect is
> visual, not a reflection of the original DOM, at least in Opera.

That's a known issue, stems from the fact that Opera is doing selections  
on the character level (in logical order) and that the shadowtrees are  
just referencing the same underlying data.

Now, if you selected the original text data in a normal <text> element  
with the DOM method selectSubString and that <text> element was referenced  
by one or more <use> elements, should the use elements be selected or not?  
If not, then there's no way to select text in shadowtrees with DOM calls  
since there's no selectSubString method on the SVGElementInstance  
interface.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed


------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to