@@ -101,7 +101,7 @@ class MposKeyboard:
101101 }
102102
103103 _current_mode = None
104- _parent = None
104+ _parent = None # used for scroll_to_y
105105 _saved_scroll_y = 0
106106 # Store textarea reference (we DON'T pass it to LVGL to avoid double-typing)
107107 _textarea = None
@@ -112,7 +112,6 @@ def __init__(self, parent):
112112 self ._parent = parent # store it for later
113113 # self._keyboard.set_popovers(True) # disabled for now because they're quite ugly on LVGL 9.3 - maybe better on 9.4?
114114 self ._keyboard .set_style_text_font (lv .font_montserrat_20 ,0 )
115- #self._keyboard.add_flag(lv.obj.FLAG.FLOATING) # removed from parent layout, immunte to scrolling
116115
117116 self .set_mode (self .MODE_LOWERCASE )
118117
@@ -255,15 +254,10 @@ def __getattr__(self, name):
255254
256255 def scroll_after_show (self , timer ):
257256 self ._keyboard .scroll_to_view_recursive (True )
258- # in a flex container, this is not needed, but without it, it might be needed:
259- #self._keyboard.move_to_index(10)
260- #self._textarea.scroll_to_view_recursive(True)
261- #self._keyboard.add_flag(lv.obj.FLAG.FLOATING) # removed from parent layout, immune to scrolling
262- #self._keyboard.move_foreground() # this causes it to be moved to the bottom of the screen in a flex container
257+ self ._textarea .scroll_to_view_recursive (True )
263258
264259 def scroll_back_after_hide (self , timer ):
265260 self ._parent .scroll_to_y (self ._saved_scroll_y , True )
266- #self._keyboard.remove_flag(lv.obj.FLAG.FLOATING) # removed from parent layout, immune to scrolling
267261
268262 def show_keyboard (self ):
269263 self ._saved_scroll_y = self ._parent .get_scroll_y ()
0 commit comments