Button released only if pressed #87
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With
if we press the mouse button outside the button, keep it pressed, then move the cursor to the button, and release the mouse button, then the button gets triggered and the console displays
This is a really surprising and non usual behaviour. This pull request addresses this by making the button firing the released event only if it was pressed. This works independently of the fact that the mouse cursor leaves the button or not in-between.