diff --git a/frontend/ui/reader/readerfrontlight.lua b/frontend/ui/reader/readerfrontlight.lua index 7b60f1ec0..361b29b2f 100644 --- a/frontend/ui/reader/readerfrontlight.lua +++ b/frontend/ui/reader/readerfrontlight.lua @@ -69,6 +69,7 @@ function ReaderFrontLight:onShowFlDialog() text = _("Toggle"), enabled = true, callback = function() + self.fl_dialog.input:setText("") fl:toggle() end, }, diff --git a/frontend/ui/widget/inputtext.lua b/frontend/ui/widget/inputtext.lua index fe936f476..7a69cc65f 100644 --- a/frontend/ui/widget/inputtext.lua +++ b/frontend/ui/widget/inputtext.lua @@ -114,6 +114,12 @@ function InputText:getText() return self.text end +function InputText:setText(text) + self:StringToCharlist(text) + self:initTextBox() + UIManager:setDirty(self.parent, "partial") +end + function InputText:StringToCharlist(text) if text == nil then return end -- clear