Skip to content
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

Closed
Vitaly-V opened this issue Oct 10, 2019 · 12 comments
Closed

[image_picker] IOS. Form field under camera overlay stays clickable. #42417

Vitaly-V opened this issue Oct 10, 2019 · 12 comments
Labels
p: image_picker The Image Picker plugin. package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@Vitaly-V
Copy link

When the camera is running, underlay form field stays clickable so you can click and see the keyboard.

ezgif-5-f87a665366b8

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

  1. Launch the App
  2. Click the floating button
  3. Click somewhere at the bottom part of the screen (close to "Cancel" or "Photo" buttons)
  4. You will see the keyboard.

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.

[   +1 ms] Synced 0.9MB.
[   +2 ms] Sending to VM service: _flutter.listViews({})
[   +4 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x114017820, isolate: {type: @Isolate, fixedId: true, id: isolates/4171590278264827,
name: main.dart$main-4171590278264827, number: 4171590278264827}}]}
[   +1 ms] <- accept
[        ] Connected to _flutterView/0x114017820.
[   +2 ms] 🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[        ] An Observatory debugger and profiler on Aleks’s iPhone is available at: http://127.0.0.1:1025/0Y2pcB8jYZ0=/
[        ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".

Analyzing camera_test...                                                
No issues found! (ran in 2.2s)

[✓] Flutter (Channel beta, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-UA)
    • Flutter version 1.9.1+hotfix.4 at /Users/vitalyvyrodov/flutter
    • Framework revision cc949a8e8b (12 days ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/vitalyvyrodov/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/vitalyvyrodov/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.7.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.1.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 39.0.5
    • Dart plugin version 192.6603.23

[✓] VS Code (version 1.38.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.5.1

[✓] Connected device (1 available)
    • Aleks’s iPhone • 56aac43470aea6a090e24b4c87cf8d410d73e94b • ios • iOS 12.4.2

• No issues found!

@BondarenkoStas BondarenkoStas added p: image_picker The Image Picker plugin. plugin labels Oct 10, 2019
@darlantc
Copy link

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?

@TahaTesser TahaTesser added p: first party platform-ios iOS applications specifically labels Mar 20, 2020
@iballan
Copy link

iballan commented Mar 21, 2020

Any solution for this ?

1 similar comment
@krunaldoshi2019
Copy link

Any solution for this ?

@rbluethl
Copy link

rbluethl commented Apr 6, 2020

Bump. Same issue here.

@imtoori
Copy link

imtoori commented Apr 10, 2020

Same issue here.

@imtoori
Copy link

imtoori commented Apr 10, 2020

@iballan @krunaldoshi2019
A possible workaround: disable the TextField before opening the camera and enable it after 🎉

@insertmike
Copy link

A possible workaround would be: Dismiss the keyboard programatically:
FocusScope.of(context).requestFocus(new FocusNode());
From: #7247

@himanshukh
Copy link

Same issue here.. Any solution for this ?

@RNSuthar
Copy link

RNSuthar commented Dec 7, 2020

Same issue here.

@assansh
Copy link

assansh commented Dec 15, 2020

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.

@TahaTesser
Copy link
Member

duplicate of #39218

@TahaTesser TahaTesser added the r: duplicate Issue is closed as a duplicate of an existing issue label Feb 9, 2021
@github-actions
Copy link

github-actions bot commented Aug 6, 2021

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: image_picker The Image Picker plugin. package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests