InputField cursor position must also be adjusted when SetText() is called. Fixes #180

pull/186/head
Oliver 6 years ago
parent 61a4cf388a
commit ec12437564

@ -102,6 +102,7 @@ func NewInputField() *InputField {
// SetText sets the current text of the input field.
func (i *InputField) SetText(text string) *InputField {
i.text = text
i.cursorPos = len(text)
if i.changed != nil {
i.changed(text)
}

Loading…
Cancel
Save