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

[BUG] Tapping issue: Tap or double tap on Samsung phones act as panning. #504

Closed
ZahraVe opened this issue Feb 15, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@ZahraVe
Copy link

ZahraVe commented Feb 15, 2022

Describe the bug
I reported this issue months ago still no fix. The issue with a single tap and also zoom with double tap on all Samsung phones still exist. I have checked the behaviour on a variety of Samsung phones from old models like Galaxy S8 to S20 ultra, Note and Folds. Tapping will act as rare as 20% of the time or less.

To Reproduce
run the following device on any Samsung phone and try to tap on the screen.

import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: PhotoViewGallery.builder(
            itemCount: 1,
            builder: (BuildContext context, int index) {
              return PhotoViewGalleryPageOptions(
                imageProvider: AssetImage('asset/no-apply.png'),
                initialScale: PhotoViewComputedScale.covered,
                minScale: PhotoViewComputedScale.contained,
                maxScale: PhotoViewComputedScale.covered * 2,
                onTapDown: (context, detail, value) {
                  print('tapped ');
                },
              );
            },
            scrollPhysics: const BouncingScrollPhysics()),
      ),
    );
  }
}

What is the current behavior?
when you TAP, or DOUBLE TAP, it starts panning 80% of the time; you will see the 'Tapped' prints out in the console when it is really tapped not pan

Expected behavior
should 'Tapped' be printed on any tap

Which versions of Flutter/Photo View, and which browser / OS are affected by this issue? Did this work in previous versions of Photo View?
[✓] Flutter (Channel stable, 2.8.0, on macOS 12.2)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.63.2)
[✓] Connected device (2 available)

@ZahraVe ZahraVe added the bug Something isn't working label Feb 15, 2022
@clragon
Copy link

clragon commented Feb 15, 2022

Duplicate of #216

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

3 participants