:: Forum >>
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
Thursday, February 7, 2008
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)
Thursday, February 7, 2008
An easier way to ask this question would be:
how do you set the caret position in an Input control?
Eric Juvet
Thursday, February 7, 2008
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)
Thursday, February 7, 2008
This topic is archived.
Back to support forum
Forum search