+gwtContrib Thanks, John LaBanca [EMAIL PROTECTED]
On Thu, Sep 18, 2008 at 2:21 PM, John LaBanca <[EMAIL PROTECTED]> wrote: > Emily - > Please do a code review on this two-for patch for TextBox. > > Description: > ======== > Calling TextBoxBase.setSelectionRange(elem, int, int) throws an exception > in FF if the element is either unattached or not visible (ie. display:none). > Also, getSelectedText() can throw an exception if the cursorPos is reported > as -1, which it can be in IE. > > Fix: > ==== > TextBoxBase.setSelectionRange() now checks if an exception occurs and > ignores it. getSelectedText() now checks if the cursorPos is -1. > > Testing: > ====== > Created unit test for the setSelectionRage() case, and verified the > following methods on all main browsers (IE versions of them): > selectAll() > getSelectionLength() > getSelectedText() > getCursorPos() > setCursorPos() > > > Thanks, > John LaBanca > [EMAIL PROTECTED] > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
