mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #1841 from chrox/chrox-master
fix broken extended InputDialog components
This commit is contained in:
@@ -77,12 +77,12 @@ function LoginDialog:init()
|
||||
}
|
||||
}
|
||||
|
||||
self.input = self.input_username
|
||||
self._input_widget = self.input_username
|
||||
|
||||
self[1] = CenterContainer:new{
|
||||
dimen = Geom:new{
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight() - self.input:getKeyboardDimen().h,
|
||||
h = Screen:getHeight() - self._input_widget:getKeyboardDimen().h,
|
||||
},
|
||||
self.dialog_frame,
|
||||
}
|
||||
@@ -96,13 +96,13 @@ end
|
||||
|
||||
function LoginDialog:onSwitchFocus(inputbox)
|
||||
-- unfocus current inputbox
|
||||
self.input:unfocus()
|
||||
self.input:onCloseKeyboard()
|
||||
self._input_widget:unfocus()
|
||||
self._input_widget:onCloseKeyboard()
|
||||
|
||||
-- focus new inputbox
|
||||
self.input = inputbox
|
||||
self.input:focus()
|
||||
self.input:onShowKeyboard()
|
||||
self._input_widget = inputbox
|
||||
self._input_widget:focus()
|
||||
self._input_widget:onShowKeyboard()
|
||||
|
||||
UIManager:show(self)
|
||||
end
|
||||
|
||||
@@ -67,12 +67,12 @@ function MultiInputDialog:init()
|
||||
VerticalGroupData,
|
||||
}
|
||||
|
||||
self.input = input_field[1]
|
||||
self._input_widget = input_field[1]
|
||||
|
||||
self[1] = CenterContainer:new{
|
||||
dimen = Geom:new{
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight() - self.input:getKeyboardDimen().h,
|
||||
h = Screen:getHeight() - self._input_widget:getKeyboardDimen().h,
|
||||
},
|
||||
self.dialog_frame,
|
||||
}
|
||||
@@ -89,13 +89,13 @@ end
|
||||
|
||||
function MultiInputDialog:onSwitchFocus(inputbox)
|
||||
-- unfocus current inputbox
|
||||
self.input:unfocus()
|
||||
self.input:onCloseKeyboard()
|
||||
self._input_widget:unfocus()
|
||||
self._input_widget:onCloseKeyboard()
|
||||
|
||||
-- focus new inputbox
|
||||
self.input = inputbox
|
||||
self.input:focus()
|
||||
self.input:onShowKeyboard()
|
||||
self._input_widget = inputbox
|
||||
self._input_widget:focus()
|
||||
self._input_widget:onShowKeyboard()
|
||||
|
||||
UIManager:show(self)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user