26 May
2006
26 May
'06
9:37 p.m.
Il giorno 26/mag/06, alle ore 23:12, Sam Gendler ha scritto:
Thanks Giacomo - I think your original example had a typo (the 1 as a last parameter), as the page you provided works great (a 0 as the last parameter).
One question - how does one select a node which has no sibling? Putting the same node as both node parameters to setBaseAndExtent has no effect.
--sam
Putting the same node with different offset works for me (this works in setBaseAndExtent but not with the range object in mozilla) if I use different (incremental) offset values. For example:
window.getSelection().setBaseAndExtent(selDiv, 0, selDiv, 1); // Same node, different offsets.
Gives the same result as the published example.