-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[image_picker] IOS. Form field under camera overlay stays clickable. #42417
Comments
I can confirm this issue exists. When I open the keyboard on a TextFormField then open the iOS camera the keyboard appears in front and I can't close it. Any news on this? |
Any solution for this ? |
1 similar comment
Any solution for this ? |
Bump. Same issue here. |
Same issue here. |
@iballan @krunaldoshi2019 |
A possible workaround would be: Dismiss the keyboard programatically: |
Same issue here.. Any solution for this ? |
Same issue here. |
One possible workaround that seems to be working in my case is to listen to app lifecycle state changes using WidgetsBinding, and absorb pointer events on the entire screen when the app is NOT resumed, like this: class _YourScreenState extends State<YourScreen> with WidgetsBindingObserver {
bool _isPaused = false;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);
setState(() {
_isPaused = state != AppLifecycleState.resumed;
});
}
@override
Widget build(BuildContext context) {
return AbsorbPointer(
absorbing: _isPaused,
child: ...,
);
}
} I'm not absolutely sure if this works 100% of the time, more testing may be needed. |
duplicate of #39218 |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When the camera is running, underlay form field stays clickable so you can click and see the keyboard.
Link to the sample App with the issue: https://github.com/Vitaly-V/camera_test
Steps to Reproduce
Some TextFormField should be under camera overlay
Also, a long-press at any place of the screen shows the keyboard.
Target Platform: IOS
Target OS version/browser: 12.4.2
Devices: iPhone 6 Plus, iPhone 7
Logs
There are no logs with this action.
The text was updated successfully, but these errors were encountered: