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

Scrolling with physical mouse is super slow on Android #82973

Closed
selvam920 opened this issue May 20, 2021 · 34 comments · Fixed by flutter/engine#44724
Closed

Scrolling with physical mouse is super slow on Android #82973

selvam920 opened this issue May 20, 2021 · 34 comments · Fixed by flutter/engine#44724
Assignees
Labels
a: mouse Issues related to using a mouse or mouse support engine flutter/engine repository. See also e: labels. found in release: 2.2 Found to occur in 2.2 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@selvam920
Copy link

selvam920 commented May 20, 2021

When i'm using keyboard and mouse in flutter android app, i found below issue.

  1. Keyboard Backspace is not working when Num Lock is ON
  2. move scroll by mouse it's smooth
    i'm using Logitec Keyboard and mouse fo this test.

Same scenario is working fine in windows desktop

Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.928], locale en-US)
• Flutter version 2.2.0 at D:\SW\flutter_windows_2.2.0-stable\flutter
• Framework revision b227420 (5 days ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0

Related but independent issue: #132866

@TahaTesser TahaTesser added the in triage Presently being triaged by the triage team label May 20, 2021
@TahaTesser
Copy link
Member

TahaTesser commented May 20, 2021

Hi @selvam920
Thanks for filing the issue.

I can reproduce the keyboard issue

Preview

stable & beta dev & master

Reproduced the issue using the following minimal code sample

minimal code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: TextField(),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}

This seems to be too fixed on the dev and master

Reproduced on the following channels

stable beta dev master

Check flutter doctor -v outputs for each channel below

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.2.0 at C:\Users\Taha\Code\flutter_stable
    • Framework revision b22742018b (6 days ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java.exe
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (4 available)
    • Redmi K20 Pro (mobile) • def0ad20 • android-arm64  • Android 10 (API 29)
    • Windows (desktop)      • windows  • windows-x64    • Microsoft Windows [Version 10.0.19042.985]
    • Chrome (web)           • chrome   • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)             • edge     • web-javascript • Microsoft Edge 90.0.818.56

! Doctor found issues in 1 category.
[✓] Flutter (Channel beta, 2.2.0, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.2.0 at C:\Users\Taha\Code\flutter_beta
    • Framework revision b22742018b (6 days ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java.exe
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (4 available)
    • Redmi K20 Pro (mobile) • def0ad20 • android-arm64  • Android 10 (API 29)
    • Windows (desktop)      • windows  • windows-x64    • Microsoft Windows [Version 10.0.19042.985]
    • Chrome (web)           • chrome   • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)             • edge     • web-javascript • Microsoft Edge 90.0.818.56

! Doctor found issues in 1 category.
[✓] Flutter (Channel dev, 2.3.0-12.1.pre, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.3.0-12.1.pre at C:\Users\Taha\Code\flutter_dev
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f9c825981c (2 days ago), 2021-05-18 14:07:52 -0700
    • Engine revision 26e217e6c3
    • Dart version 2.14.0 (build 2.14.0-edge.a527411e5100a0a4f48c4009087a1b988aa784af)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.2.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (5 available)
    • Redmi K20 Pro (mobile)  • def0ad20 • android-arm64   • Android 10 (API 29)
    • Windows (desktop)       • windows  • windows-x64     • Microsoft Windows [Version 10.0.19042.985]
    • Windows (UWP) (desktop) • winuwp   • windows-uwp-x64 •
    • Chrome (web)            • chrome   • web-javascript  • Google Chrome 90.0.4430.212
    • Edge (web)              • edge     • web-javascript  • Microsoft Edge 90.0.818.56

• No issues found!
[✓] Flutter (Channel master, 2.3.0-13.0.pre.59, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.3.0-13.0.pre.59 at C:\Users\Taha\Code\flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1e35f4c0c6 (8 hours ago), 2021-05-20 03:14:01 -0400
    • Engine revision 67c537d41b
    • Dart version 2.14.0 (build 2.14.0-129.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.2.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (5 available)
    • Redmi K20 Pro (mobile)  • def0ad20 • android-arm64   • Android 10 (API 29)
    • Windows (desktop)       • windows  • windows-x64     • Microsoft Windows [Version 10.0.19042.985]
    • Windows (UWP) (desktop) • winuwp   • windows-uwp-x64 •
    • Chrome (web)            • chrome   • web-javascript  • Google Chrome 90.0.4430.212
    • Edge (web)              • edge     • web-javascript  • Microsoft Edge 90.0.818.56

• No issues found!

✅ : Reproducible ❌: Not Reproducible

Can you please upgrade to the latest dev and try again
Execute the following commands to upgrade
flutter channel dev
flutter upgrade --force
flutter doctor -v

but I am not sure what's the mouse issue you're describing, please explain the mouse issue

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2021
@selvam920
Copy link
Author

selvam920 commented May 20, 2021

The mouse issue is like scroll by mouse wheel up and down the page is not moving smooth,
It's very hard to come down in android, same app is working fine in windows desktop

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2021
@TahaTesser
Copy link
Member

TahaTesser commented May 21, 2021

Hi @selvam920
Thanks for the details
The keyboard issue looks like a duplicate of #78769

I can now also reproduce the mouse

No matter how fast I scroll, scrolling is slow as a snail on Android when using a Bluetooth mouse

Reproduced the issue using the following minimal code sample

minimal code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: ListView.builder(
          itemCount: 20,
          itemBuilder: (BuildContext context, int index) {
            return FlutterLogo(
              size: 300,
              style: FlutterLogoStyle.horizontal,
            );
          },
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}
Preview

Reproduced on the following channels

channel result
stable reproduced
master reproduced

Check flutter doctor -v outputs for each channel below

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.2.0 at C:\Users\Taha\Code\flutter_stable
    • Framework revision b22742018b (6 days ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java.exe
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (4 available)
    • Redmi K20 Pro (mobile) • def0ad20 • android-arm64  • Android 10 (API 29)
    • Windows (desktop)      • windows  • windows-x64    • Microsoft Windows [Version 10.0.19042.985]
    • Chrome (web)           • chrome   • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)             • edge     • web-javascript • Microsoft Edge 90.0.818.56

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.3.0-13.0.pre.87, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.3.0-13.0.pre.87 at C:\Users\Taha\Code\flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d6a925326 (4 hours ago), 2021-05-21 01:09:02 -0400
    • Engine revision 20260fb95f
    • Dart version 2.14.0 (build 2.14.0-134.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31313.79
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.2.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] VS Code (version 1.56.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[✓] Connected device (5 available)
    • Redmi K20 Pro (mobile)  • def0ad20 • android-arm64   • Android 10 (API 29)
    • Windows (desktop)       • windows  • windows-x64     • Microsoft Windows [Version 10.0.19042.985]
    • Windows (UWP) (desktop) • winuwp   • windows-uwp-x64 •
    • Chrome (web)            • chrome   • web-javascript  • Google Chrome 90.0.4430.212
    • Edge (web)              • edge     • web-javascript  • Microsoft Edge 90.0.818.56

@TahaTesser TahaTesser changed the title Flutter android keyboard & mouse issue Scrolling with physical mouse is super slow on Android May 21, 2021
@TahaTesser TahaTesser added a: mouse Issues related to using a mouse or mouse support engine flutter/engine repository. See also e: labels. found in release: 2.2 Found to occur in 2.2 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-android Android applications specifically and removed in triage Presently being triaged by the triage team labels May 21, 2021
@chinmaygarde
Copy link
Member

This may be a case of scroll wheel deltas not wired up correctly. Perhaps not taking into account DPI scaling? cc @gspencergoog

@chinmaygarde chinmaygarde added the P2 Important issues not at the top of the work list label May 24, 2021
@selvam920
Copy link
Author

This issue not only android phone found in android tv, chromebook also

@selvam920
Copy link
Author

Tag P4 added this issue, when will it be fixed?

@rxvincent
Copy link

Any update? This issue is still reproduced at 3.3.0-0.1pre.

@Onein
Copy link

Onein commented Aug 18, 2022

Would be great if this issue and #107400 would get some attention, because now Flutter apps are barely usable on Chrome OS devices.

@selvam920
Copy link
Author

Any update in this issue?

@selvam920
Copy link
Author

any update on this?

@esDotDev
Copy link

Is there some sort of workaround we could use to fix this for all lists across the app?

We could probably manually listen to the mouse wheel and drive the scroll controller ourselves, but we would need to do that manually for every list in the app. Maybe there is a more straightforward way?

@selvam920

This comment was marked as off-topic.

@selvam920

This comment was marked as duplicate.

@bksubhuti
Copy link

I recently had a report about our app not supporting proper scrolling with Bluetooth mice. Our app is multi-platform on Windows, Android, ioS, Mac, Linux. I borrowed a BT mouse for testing. I can confirm that Bluetooth mouse support works with our desktop app but with virtually the same code on android, it has the same issue reported here: very slow scroll wheel scrolling problem. I would imagine this was forgotten for Android because it was assumed that the user would use the touch features. However, people connect BT keyboards and mice to tablets all of the time. Our app also supports a desktop mode while rotated in landscape android.

We have over 2000 active devices for Android:
Android App https://play.google.com/store/apps/details?id=com.paauk.tipitakapalireader
Windows App https://apps.microsoft.com/store/detail/tipitaka-pali-reader/9MTH9TD82TGR?hl=en-us&gl=us

Furthermore, to be sure it was a flutter problem I downloaded syncfusion (flutter gallery app) and went to the pdf reader sample. This android bt mouse scroll problem also existed. It is therefore a flutter framework problem.
https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples

@selvam920
Copy link
Author

Seems no one is working with this bug, this bug was created two years ago

@selvam920
Copy link
Author

This bug did not close from when i created

@bksubhuti
Copy link

I think you have the power to close. and you have the power to create. The focus of the bug seemed to be diverted to keyboard. I'd close it .. then make a new bug report . If you have the minimum app, then you can explain.. plus you can reference 3 other apps. Your own, mine, and syncfusion. Furthermore, syncfusion and TPR are available on the store. Furthermore, I can confirm that scrolling does work on windows desktop. Lastly, there are 2000 android devices using our TPR app and we have stated a better reason why it is need.

Close the issue.. and then make a new one. share the link when you do.

@selvam920
Copy link
Author

selvam920 commented Jun 9, 2023

I will close this bug now, you can create new bug with bug details

@esDotDev
Copy link

esDotDev commented Jun 9, 2023

I'd keep this open, it has 15 upvotes which is a core metric the Flutter team uses to determine priority. I know this issue is already on the Flutter teams radar as well. If anything just update the OP to be more clear/specific

@gspencergoog
Copy link
Contributor

We do look at comments on existing bugs, and filing a new identical bug will not get a different prioritization. I'm sorry this hasn't risen to the top of our queue: there are a lot of other issues to attend to.

I'm reopening this because it has a lot of context that would be lost in a new issue (including recent comments).

@gspencergoog gspencergoog reopened this Jun 9, 2023
@selvam920
Copy link
Author

Is there any use to reopen this bug? Bcoz this bug we waited almost 2 years

@gspencergoog
Copy link
Contributor

Yes, in includes investigative work that we won't have to do again when we get to fixing it. It has a reproduction steps and verification, as well as upvotes that will help it get to the top of the queue. There's plenty of reason to keep it open.

@bksubhuti
Copy link

okay.. looks like we got some attention. I hope my information helped. Furthermore, Flutter was quite new then. I would imagine this is one of the issues they would like to solve at this point and tablet as a computer is more common now too. Desktops were in beta back then. I hope we can test a fix for this soon.

@selvam920

This comment was marked as off-topic.

@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
@johnmccutchan johnmccutchan self-assigned this Jul 31, 2023
@reidbaker reidbaker self-assigned this Aug 7, 2023
@selvam920

This comment was marked as off-topic.

@bksubhuti
Copy link

you would need to test and let me know.. However, we did add keyboard scrolling. You can see if that works on android.
pageup and pagedown and updown arrows work on desktop.

@selvam920
Copy link
Author

Are you talking about android or desktop?

@bksubhuti
Copy link

You are talking about android.. therefore I'm also saying.. hey you can try testing. I don't have the ability to test without asking for equipment from another monk. If you report back your findings with your own equipment based on android.

@reidbaker
Copy link
Contributor

Update I found a solution to this and am working on the unit tests now. It did however expose that flutter takes a few seconds longer than android to register mouse input. I may need to file a different issue to track that work.

auto-submit bot pushed a commit to flutter/engine that referenced this issue Aug 22, 2023
Fixes flutter/flutter#82973

Mouse scroll wheel support for android. 

I chose to not cache the vertical and horizontal scale factors that come from view configuration. The primary reason is that in the current code path context is only used when the user scrolls which was the unimplemented feature. This smaller blast radius I decided was worth the additional calls. A secondary reason is that when the scale factors are changed is not a well documented path nor is there a lifecycle callback to listen to. Scroll factor is cached on api 25 and below because that more closely mirrors the behavior I see in pre 25 versions of android scroll view. 

Note flutter takes longer to "see" a mouse that then scrolls than android

Fixes #flutter/flutter/82973

Todo list prior to merge

## Links 
* Some pre api 26 scroll factor code 
    - https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/View.java?q=function:getVerticalScrollFactor%20filepath:android%2Fview%2FView.java&ss=android%2Fplatform%2Fsuperproject%2Fmain 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=930;drc=2fe301db7555bccf53e465436d4cb7442c803df3;bpv=0;bpt=0
* Post api 26 scroll factor code 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=361;drc=406e0f655387f27dda874c2b975fb0ddbd61aa13;bpv=0;bpt=0 
    - https://developer.android.com/reference/android/view/ViewConfiguration#getScaledVerticalScrollFactor()
@selvam920
Copy link
Author

@reidbaker Wow, it's great working on master channel

@bksubhuti
Copy link

That is great.. We have an open issue on this. If you can push a note when it goes to the main channel.

gaaclarke pushed a commit to gaaclarke/engine that referenced this issue Aug 30, 2023
Fixes flutter/flutter#82973

Mouse scroll wheel support for android. 

I chose to not cache the vertical and horizontal scale factors that come from view configuration. The primary reason is that in the current code path context is only used when the user scrolls which was the unimplemented feature. This smaller blast radius I decided was worth the additional calls. A secondary reason is that when the scale factors are changed is not a well documented path nor is there a lifecycle callback to listen to. Scroll factor is cached on api 25 and below because that more closely mirrors the behavior I see in pre 25 versions of android scroll view. 

Note flutter takes longer to "see" a mouse that then scrolls than android

Fixes #flutter/flutter/82973

Todo list prior to merge

## Links 
* Some pre api 26 scroll factor code 
    - https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/View.java?q=function:getVerticalScrollFactor%20filepath:android%2Fview%2FView.java&ss=android%2Fplatform%2Fsuperproject%2Fmain 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=930;drc=2fe301db7555bccf53e465436d4cb7442c803df3;bpv=0;bpt=0
* Post api 26 scroll factor code 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=361;drc=406e0f655387f27dda874c2b975fb0ddbd61aa13;bpv=0;bpt=0 
    - https://developer.android.com/reference/android/view/ViewConfiguration#getScaledVerticalScrollFactor()
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

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 Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: mouse Issues related to using a mouse or mouse support engine flutter/engine repository. See also e: labels. found in release: 2.2 Found to occur in 2.2 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants