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

26665: Toolbar buttons do not react to long clicks #26679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krasko78
Copy link
Contributor

Resolves: #26665

This is the same issue as #16012. The fix done there appears not to have fixed it. Handling the pressAndHold signal, even directly as implemented in the fix, suppresses the click signal.

I have found a new fix: when handling the pressAndHold signal, if we do not consume it, we should set the accepted property of the mouse event to false. In this case the click event will not be suppressed. Interestingly, for pressAndHold the accepted property is true by default which means the event has to be unaccepted if not consumed. So I am reverting the fix for #16012 and am taking care of the accepted property: in FlatButton I set accepted to false to not suppress the click signal if there are no handlers or none consumes the event. On the other hand, when pressAndHold is consumed in NoteInputBar and StyledToolBarItem, accepted will be set to true.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toolbar buttons do not react to long clicks
1 participant