mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 14:22:58 +03:00
fix(textinput): set cursor on initial value
This reverts the code back to the logic from 4ce16e8 which fixed the issue of the cursor not being moved when an initial value was set with SetValue. The fix regressed in 16053f4.
This commit is contained in:
parent
69bf367d37
commit
14d9f9cd76
@ -205,7 +205,7 @@ func (m *Model) SetValue(s string) {
|
||||
} else {
|
||||
m.value = runes
|
||||
}
|
||||
if (m.pos == 0 && len(m.value) == 0) || m.pos > len(m.value) {
|
||||
if m.pos == 0 || m.pos > len(m.value) {
|
||||
m.setCursor(len(m.value))
|
||||
}
|
||||
m.handleOverflow()
|
||||
|
Loading…
Reference in New Issue
Block a user