Skip to content

Commit

Permalink
Merge pull request #1121 from EnsembleUI/fix-keyboard
Browse files Browse the repository at this point in the history
fix: keyboard hides textfield
  • Loading branch information
snehmehta authored Jan 9, 2024
2 parents a05e88c + e38b93e commit 5b102a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/framework/data_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,11 @@ class NativeInvokable extends ActionInvokable {
screenName: screenName, pageArgs: inputMap, asModal: true);
// how do we handle onModalDismiss in Typescript?
}

void closeAllDialogs() {
ScreenController().executeAction(buildContext, CloseAllDialogsAction());
}

void showDialog(dynamic widget) {
ScreenController()
.executeAction(buildContext, ShowDialogAction(widget: widget));
Expand Down
16 changes: 12 additions & 4 deletions lib/framework/view/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ class PageState extends State<Page>
);
}

Widget getBodyContent() => isScrollableView
? buildScrollablePageContent(hasDrawer)
: buildFixedPageContent(fixedAppBar != null);

Widget rtn = DataScopeWidget(
scopeManager: _scopeManager,
child: Unfocus(
Expand All @@ -421,13 +425,17 @@ class PageState extends State<Page>

// appBar is inside CustomScrollView if defined
appBar: fixedAppBar,
body: isScrollableView
? buildScrollablePageContent(hasDrawer)
: buildFixedPageContent(fixedAppBar != null),
body: footerWidget == null
? getBodyContent()
: Column(
children: [
Expanded(child: getBodyContent()),
footerWidget!,
],
),
bottomNavigationBar: _bottomNavBar,
drawer: _drawer,
endDrawer: _endDrawer,
bottomSheet: footerWidget,
floatingActionButton: closeModalButton,
floatingActionButtonLocation:
widget._pageModel.pageStyles?['navigationIconPosition'] ==
Expand Down

0 comments on commit 5b102a4

Please sign in to comment.