Possible Script Control Method Bug

In coding a Dopus script I found, the //dlg.query_edit.SelectRange(-1); is not working as documented.

Instead of placing the cursor at the end of the contents in the Edit Control, it places the cursor at the beginning of the control (or has no effect).

Workaround:
dlg.query_edit.SelectRange(dlg.query_edit.value.length + "," + dlg.query_edit.value.length);

In above example, the query_edit is an Edit Control.

The documentation doesn't seem to say anything about calling SelectRange with just a single argument?

SelectRange(-1,-1) is what I'd expect to put the cursor at the end, at least based on the documentation (and how the Edit control selection/cursor works in the Windows API, which helps a lot to know, but isn't obvious unless you've worked with them).

You are correct! Thank you!