mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
InputText: Unbreak onTapTextBox on an already in-focus field (#12449)
The drive-by fix for the original issue noticed late in #12361 turned out to be a bit heavy-handed ;). Fix #12444 Regression since #12361
This commit is contained in:
parent
824bb98407
commit
ae5222b97a
@ -142,8 +142,11 @@ local function initTouchEvents()
|
||||
if self.keyboard then
|
||||
self.keyboard:showKeyboard()
|
||||
end
|
||||
-- Make sure we're flagged as in focus again
|
||||
self:focus()
|
||||
-- Make sure we're flagged as in focus again.
|
||||
-- NOTE: self:focus() does a full free/reinit cycle, which is completely unnecessary to begin with,
|
||||
-- *and* resets cursor position, which is problematic when tapping on an already in-focus field (#12444).
|
||||
-- So, just flip our own focused flag, that's the only thing we need ;).
|
||||
self.focused = true
|
||||
end
|
||||
if self._frame_textwidget.dimen ~= nil -- zh keyboard with candidates shown here has _frame_textwidget.dimen = nil
|
||||
and #self.charlist > 0 then -- do not move cursor within a hint
|
||||
|
Loading…
Reference in New Issue
Block a user