Thanks for the clarification. I am sure I am close now. but still get
an error. my code is
private native Element getSelectedTextParent() /*-{
var range = null;
if($wnd.document.selection){
range = $wnd.document.selection.createRange();
} else if ($wnd.getSelection) {
range = $wnd.getSelection().createRange();
} else if ($wnd.document.getSelection) {
range = $wnd.document.getSelection().createRange();
}
return range.parentElement();
// return $doc.selection.createRange().parentElement();
}-*/;
I am getting $wnd.getSelection().createRange is not a function in
FireFox. it seems $wnd.getSelection() is ok, but can not createRange()?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---