3.2.0

selection state for input control

[I am a multiple ActiveWidgets license holder.]

Say you have an Input control that currently contains the text "stuff"

When you tab into the control, the word "stuff" is selected and highlighted.

How would you enter the Input control in edit mode? That is, you tab into the Input control and no text is selected, you get the blinking text cursor and can begin typing.
Eric Juvet
February 7,
AW.UI.Input tries to implement the same behavior as native <input> tag - when you tab into <input> the text inside becomes selected.

You can change this if you add onControlEditStarted event event handler, get access to the input element (using getContent("box/text")) and move the selection to the end of the content text.
Alex (ActiveWidgets)
February 7,
An easier way to ask this question would be:
how do you set the caret position in an Input control?
Eric Juvet
February 7,
AW does not provide any special API for this purpose - you have to use native IE-specific methods in IE and DOM API in Firefox/Safari/Opera.
Alex (ActiveWidgets)
February 7,

This topic is archived.

See also:


Back to support forum