:: Forum >> Version 2 >>

No auto-select when entering Input field

A have a form with a number of AW.UI.Input and AW.HTML.Input fields in it. When users tab through the fields, the content of each field is automatically selected. The users of this application don't like that behavior, since if they hit another key by accident, it deletes the content of the current field. Is there a way I can configure those fields to not auto-select the content of the field when the field gets focus? The cursor should go to the beginning of the field, but the field content should not be selected. Any ideas would be most welcome.
Randall Severy
Thursday, March 22, 2007
Bump. Anyone have any ideas on this issue?
Randall Severy
Wednesday, March 28, 2007
Here is the code which moves the selection to the beginning of the text for AW.UI.Input control -

obj.onControlEditStarted = function(text){
    var 
this.getContent("box/text").element();
    if (
AW.ie) {
        var 
e.createTextRange();
        
r.collapse();
        
r.select();
        
null;
    }
    else {
        
e.selectionEnd 0;
    }
    
null;
}
 
Alex (ActiveWidgets)
Wednesday, March 28, 2007



This topic is archived.

Back to support forum

Forum search