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

When dismissOnCapturedTaps is true, copying text is not working #126

Open
petrnymsa opened this issue Oct 27, 2022 · 0 comments
Open

When dismissOnCapturedTaps is true, copying text is not working #126

petrnymsa opened this issue Oct 27, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@petrnymsa
Copy link

Describe the bug
When dismissOnCapturedTaps is set to true in KeyboardDismissOnTap user is not able to copy text / select text from SelectableText or from TextField etc.

To Reproduce

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return KeyboardDismissOnTap(
      dismissOnCapturedTaps: true,
      child: SafeArea(
        child: Scaffold(
          body: Padding(
            padding: const EdgeInsets.all(30.0),
            child: Column(
              children: [
                const SelectableText('Try me to copy'),
                const SizedBox(height: 60),
                Container(color: Colors.amber, child: const TextField()),
                const SizedBox(height: 60),
                Container(color: Colors.amber, child: const TextField()),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Try to

  • Select text from "Try me to copy"
  • Insert some text into any field and later try to select this text to copy/delete

Expected behavior
This behavior I think is not directly expected as this breaks UX of fields. The issue is with Listener.onPointerUp. I dont know if is it possible to detect for example just buttons and preserve TextFields / SelectableText behavior

Info (please complete the following information):
flutter_keyboard_visibility version: 5.4.0
Reproducible on platforms (Android, iOS, etc): Android
Flutter: 3.0.5

@petrnymsa petrnymsa added the bug Something isn't working label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant