-
Notifications
You must be signed in to change notification settings - Fork 30.6k
menuChildren by MenuAnchor gets hidden behind mobile keyboard #142921
Copy link
Copy link
Closed
flutter/ai
#139Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.20Found to occur in 3.20Found to occur in 3.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.20Found to occur in 3.20Found to occur in 3.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Steps to reproduce
Using
MenuAnchor(orDropDownMenu) within a scrollableListViewwhere anchor itself is aTextField. When scrolled and anchor is positioned at the bottom of the screen and typed within,menuChildrenpop up and get hidden behind mobile keyboard.If anchor would be a button, then
menuChildrenwould appear above the anchor as expected.When the screen is touched (and not when actual tap happened) outside of the anchor and its children,
MenuAnchorcloses (aka hides the children). Due to this, if the user tries to adjust the scroll position to see themenuChildren, those will immediately disappear.Applying
scrollPaddingtoTextFieldworks IF it is not positioned around at the end of the screen/ListView. Because then it's limited how much it can usescrollPadding(ex.: ifTextFieldis 20 pixels away from the end ofListView, setting a bottomscrollPaddingto 100 pixels, still only applies 20 pixels). In that scenario would need to detect when ifTextFieldis focused and apply additional bottom padding to theListView.As a side note I mention, when anchor is at the end of ListView (which is my case),
menuChildrenappears behind the keyboard. When closing the keyboard,menuChildrenis repositioned above the anchor. Sometimes, an extra gap appears between the children and the anchor in this case.Expected results
menuChildrenwould appear above the anchorActual results
menuChildrenappear below the anchor and behind the mobile keyboard.Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Logs
No response
Flutter Doctor output
Doctor output