feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
915 stars 386 forks source link

TextInput.setFocus() and selectRange() #1737

Open mshaffer12882 opened 6 years ago

mshaffer12882 commented 6 years ago

setFocus calls selectRange(0, this._text.length), which selects all the text. This causes a problem on iOS especially when multiline = false because of the AIR bug. The TextInput will select all the text very quickly and then change if you call selectRange() right after setFocus(). However, if you place the cursor at the end of the text and then call selectRange it gives it a much cleaner look in my option.

Maybe a having an argument to set the range so you don't have to call selectRange? or change it to this.selectRange(this._text.length, -1); so it places the cursor at the end of the text instead of selecting all the text?

What do you think?