CommunityToolkit / CommunityToolkit/Maui

[BUG] TouchBehavior scaling causes flickering

Open
#1,796 4 comments 0 reactions 0 assignees View on GitHub
area/behaviors bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

When you add a feature like HoverScale="0.5", placing your mouse cursor over the control will resize it accordingly.
However, if as a result of the scaling the cursor is now seen as outside the area of the then-scaled control, the scaling is then reset to 1 automatically.
once that happens, the cursor will again be in over the control, so it'll scale it down to 0.5 again.
rinse, repeat.

### Expected Behavior

Not entirely sure how to describe the correct behavior, but it shouldn't really trip over itself when applying scaling when hovering.

### Steps To Reproduce

1. Create a control with a TouchBehavior, preferably a large control that takes a good chunk of the screen size like shown below:
2.
```







```

5. run the app and hover the mouse close to the edge of the control, so that when it scales down the mouse cursor will no longer be over the top of the scaled control.
6. observe the control repeatedly going into the two scaled states.

### Link to public reproduction project repository

https://github.com/MitchBomcanhao/Maui
sorry, I don't have a proper repro project as it is a very basic scenario. linked to a fork of the toolkit repository in order to be able to raise this report. the bug report form mentions we need a project link `Otherwise the issue will be marked with "Needs reproduction" label and will have a lower priority. Attached zip files cannot be opened by us.` which is untrue - if we don't have a link we can't even submit the report.

### Environment

```markdown
- .NET MAUI CommunityToolkit:8.0.1
- OS: Windows 10.0.19045.4170
- .NET MAUI: 8.0.14
```

### Anything else?
Here is a screen recording
![HoverScaleFlicker 2024-04-05 09-38-13](https://github.com/CommunityToolkit/Maui/assets/31066938/a6f2041b-2762-413c-a097-e28044dc1da2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.