summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/inputwidget.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index fe897ed4..c60cd99e 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -2189,15 +2189,16 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
2189 return iFalse; 2189 return iFalse;
2190 } 2190 }
2191 else if (isCommand_UserEvent(ev, "keyboard.changed")) { 2191 else if (isCommand_UserEvent(ev, "keyboard.changed")) {
2192 /* Scroll to keep widget visible when keyboard appears. */ 2192 const iBool isKeyboardVisible = (arg_Command(command_UserEvent(ev)) != 0);
2193 if (isFocused_Widget(d) && arg_Command(command_UserEvent(ev))) { 2193 /* Scroll to keep widget visible when keyboard appears. */
2194 d->lastOverflowScrollTime = SDL_GetTicks(); 2194 if (isFocused_Widget(d)) {
2195 overflowScrollToKeepVisible_InputWidget_(d); 2195 if (isKeyboardVisible) {
2196// rect.pos.y -= value_Anim(&get_Window()->rootOffset); 2196 d->lastOverflowScrollTime = SDL_GetTicks();
2197 //const iInt2 visRoot = visibleSize_Root(w->root); 2197 overflowScrollToKeepVisible_InputWidget_(d);
2198 //if (bottom_Rect(rect) > visRoot.y) { 2198 }
2199 //setValue_Anim(&get_Window()->rootOffset, -(bottom_Rect(rect) - visRoot.y), 250); 2199 else {
2200 //} 2200 setFocus_Widget(NULL); /* stop editing */
2201 }
2201 } 2202 }
2202 return iFalse; 2203 return iFalse;
2203 } 2204 }