SetSelection not working on field

I am trying to select the text in a field that is tied to a formDataSource. I am using the Enter method of the field to apply the selection. The code looks like this code block below. The method does get executed, but nothing happens. If I Select all from the context menu, or hit Ctrl + A, the text is selected.

public void enter()
        {
            super();
            int TxtLen = strLen(SCTable_TypeCode.valueStr());
            SCTable_TypeCode.setSelection(0, TxtLen);
            SCTable_TypeCode.setFocus();
        }

What am I missing on this?

Regards,

Shawn

I tried setSelection() and it doesn’t seem to work for me either. I suspect that this behavior hasn’t been upgraded to work in web browsers.

It looks like the #TaskSelectAll isn’t working either. I added element.task(#taskSelectAll); to the Enter method and still nothing happened.

The Ctrl+A context menu from the control does work.