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]: Stylus input does not return to the selected tool on the first stroke after releasing stylus button #809

Closed
1 task done
chriscavalluzzi opened this issue Mar 18, 2025 · 7 comments
Assignees
Labels
bug Something isn't working confirmed
Milestone

Comments

@chriscavalluzzi
Copy link
Contributor

What happened?

When using a stylus, if you have a stylus button configured to switch to a different tool, the next stroke after releasing the button still uses the button's tool, instead of returning to the selected tool. Depending on which tool is mapped to the button, the second stroke after releasing the button may or may not return to the selected tool.

I believe this is a beta 3 regression, since this worked as expected in 2.3.0-beta.2.

My input settings:

  • Pen
    • Pen only input: Checked or Unchecked (Same issue regardless)
    • Shortcuts
      • Pen: [Blank]
      • First: 2
      • Second: 2
  • Touch (Changing these doesn't seem to have any effect, but here they are anyway)
    • Input gestures: Checked
    • Move on gesture: Checked
    • Shortcuts
      • Touch: 0

My document toolbar layout:

  1. Pen
  2. Path Eraser
  3. Lasso Select
  4. ...

Steps to reproduce:

  1. Set input settings to those listed above
  2. Open a document
  3. Reorder the first few tools as listed above
  4. Select the Pen tool
  5. Draw a stroke with a stylus
  6. Begin holding a button on the stylus
  7. Path Eraser is now enabled, use the stylus to erase the first stroke
  8. Release the stylus button
  9. Attempt to draw another stroke, and notice that the Path Eraser is still active
  10. Attempt to draw the stroke again, and notice that the stroke is drawn normally

If the button is configured to map to the Lasso Select tool (for example, if you switch the order of Path Eraser and Lasso Select in the toolbar), drawing strokes will never return back to the selected tool, instead you will continue drawing lassos with every stroke until you manually change tools using the toolbar.

Version

2.3.0-beta.3

Platform

Android

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct
@chriscavalluzzi chriscavalluzzi added the bug Something isn't working label Mar 18, 2025
@github-project-automation github-project-automation bot moved this to 📕 Todo in Butterfly Mar 18, 2025
@CodeDoctorDE
Copy link
Member

Thanks for reporting. I dont have a pen on android, i will test it on web and come back if i can reproduce it

@CodeDoctorDE
Copy link
Member

bug reproducable thanks for reporting

@CodeDoctorDE CodeDoctorDE added this to the 2.3 milestone Mar 18, 2025
@github-project-automation github-project-automation bot moved this from 📕 Todo to ✅ Done in Butterfly Mar 18, 2025
@CodeDoctorDE
Copy link
Member

I don't know if this really was a regression in beta.3, but now it should work in the next 2.3.0-beta.4 release, that should release in the next 2 weeks

@chriscavalluzzi
Copy link
Contributor Author

Confirmed fixed on Android with a pen, using a build of commit fcdd907c5. Thanks very much!! 😊

@chriscavalluzzi
Copy link
Contributor Author

FYI this bug returned after 22fba74, same reproduction steps. Reverting the changes to app/lib/cubits/current_index.dart fixes the issue, but I haven't investigated how to solve the issue while respecting the goal of that commit.

@CodeDoctorDE
Copy link
Member

Hmm, this looks a bit tricky. I will look at it and try to find a fix that resolves both problems

@CodeDoctorDE
Copy link
Member

Tested it with a mouse and it doesn't have the bug. It keeps the temporary tool until you start touching the screen again.
I will test it with a stylus later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
Status: Done
Development

No branches or pull requests

2 participants