diff --git a/frontend/ui/widget/inputtext.lua b/frontend/ui/widget/inputtext.lua index 624b6fcfb..3fd0d7fb9 100644 --- a/frontend/ui/widget/inputtext.lua +++ b/frontend/ui/widget/inputtext.lua @@ -434,7 +434,11 @@ function InputText:addChars(chars) if self.readonly or not self:isTextEditable(true) then return end + self.is_text_edited = true + if #self.charlist == 0 then -- widget text is empty or a hint text is displayed + self.charpos = 1 -- move cursor to the first position + end table.insert(self.charlist, self.charpos, chars) self.charpos = self.charpos + #util.splitToChars(chars) self:initTextBox(table.concat(self.charlist), true)