I looked up some cross browser code. but I am getting different results if (document.getSelection) { var range = document.getSelection().createRange();; } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); } else { var str = "Sorry, this is not possible with your browser."; }
I use the range to get the parent Element, range.parentElement(); originally (using $doc), I get back a div, now I am getting back the BODY element. document.selection does not seem to be equivalent to $doc.selection, even though it removes the browser incompatibility. any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---