Has anyone had any experience with getting an inpu...
# compose
m
Has anyone had any experience with getting an input text working in a Popup window? When i try to do this, the keyboard never comes up. Something as simple as this doesn’t work:
Copy code
Popup(alignment = Alignment.Center) {
                    Surface(modifier = Modifier.fillMaxSize()) {
                        Column(modifier = Modifier.padding(16.dp)) {
                            OutlinedTextField(
                                value = textValue.value,
                                onValueChange = { textValue.value = it })
                        }

                    }
                }
            }
i
PopupProperties.focusable
m
Thank you @Ivan Matkov I’ve been struggling over this for months.
So i still have a bit of an isssue @Ivan Matkov, but it’s an odd case. We’re in a hybrid xml/compose environment and the main part of the screen is owned elsewhere and in the regular view world. We have some parts of the screen written in compose that need to popup modal bottom sheets. So what i’m doing is layering these things so that i can get access to the full screen height. Popup ModalBottomSheetLayout TextField The problem is when the popup is involved, the keyboard ends up over the text field. .
i
See
WindowInsets.ime
or
WindowInsets.safeDrawing
m
I tried apply the imePadding modifier, but i can see the field briefly moving up and then ends up back behind the keyboard again.
@Ivan Matkov I’m struggling on this even after compose 1.6 (sorry for the direct tag), but this has been a sore spot for months
i
Please share the reproduction code, it's hard to say what's wrong without it
m
@Ivan Matkov I tried this with the M3 ModalBottomSheet, and it works properly. There’s no point spinning my head over this when i can get it working right with selective use of m3
Thanks for responding though. This will give me some reason to push on the rest of the team to speed up our adoption of m3. We do have our own design system and theme which makes heavy use of some stuff like LocalContentColor, LocalTextStyle, etc… So there is work for us to support m3