public class

TextBoxImplIE6

extends TextBoxImpl
java.lang.Object
   ↳ com.google.gwt.user.client.ui.impl.TextBoxImpl
     ↳ com.google.gwt.user.client.ui.impl.TextBoxImplIE6

Class Overview

IE6-specific implementation of TextBoxImpl.

Summary

Public Constructors
TextBoxImplIE6()
Public Methods
int getCursorPos(Element elem)
int getSelectionLength(Element elem)
int getTextAreaCursorPos(Element elem)
The text reported in the text range does not include newline characters at the end of the selection.
int getTextAreaSelectionLength(Element elem)
void setSelectionRange(Element elem, int pos, int length)
Moving the start 1 character will move across a \r\n, but \r\n counts as two characters, so we need to offset the position accordingly.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.impl.TextBoxImpl
From class java.lang.Object

Public Constructors

public TextBoxImplIE6 ()

Public Methods

public int getCursorPos (Element elem)

public int getSelectionLength (Element elem)

public int getTextAreaCursorPos (Element elem)

The text reported in the text range does not include newline characters at the end of the selection. So, we need to create 2 ranges and subtract a character from one until the lengths are different. At that point, we know exactly how many \r\n were truncated from the selection.

public int getTextAreaSelectionLength (Element elem)

public void setSelectionRange (Element elem, int pos, int length)

Moving the start 1 character will move across a \r\n, but \r\n counts as two characters, so we need to offset the position accordingly.