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

[Android] [Slider] PointerReleased not flagged as handled #15382

Open
mcocaroUX opened this issue Feb 6, 2024 · 6 comments
Open

[Android] [Slider] PointerReleased not flagged as handled #15382

mcocaroUX opened this issue Feb 6, 2024 · 6 comments
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...) project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers

Comments

@mcocaroUX
Copy link

mcocaroUX commented Feb 6, 2024

Cf. updated issue description in comment below : #15382 (comment)

### Current behavior

PointerReleased event is not triggering when releasing the slider

### Expected behavior

PointerReleased should trigger when releasing the slider

How to reproduce it (as minimally and precisely as possible)

ReproApp.zip

  1. Run the app
  2. Press the slider and release it
  3. Notice how event is not triggered

Workaround

As a workaround I tried using PointerExited but that wont work for me because when moving the pointer outside the slider it triggers

Works on UWP/WinUI

Yes

Environment

No response

NuGet package version(s)

<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Extensions.Authentication" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Authentication.WinUI" Version="3.0.19" />

<PackageVersion Include="Uno.Extensions.Configuration" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Hosting" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Hosting.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Http" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Http.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Http.Refit" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Localization" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Localization.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.7.0" />
<PackageVersion Include="Uno.Extensions.Logging.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Navigation" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Navigation.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Reactive" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Reactive.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Serialization" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Serialization.Http" Version="3.0.19" />
<PackageVersion Include="Uno.Extensions.Serialization.Refit" Version="3.0.19" />
<PackageVersion Include="Uno.Material.WinUI" Version="4.0.6" />
<PackageVersion Include="Uno.Dsp.Tasks" Version="1.2.8" />
<PackageVersion Include="Uno.Toolkit.WinUI" Version="5.0.19" />
<PackageVersion Include="Uno.Extensions.Toolkit.WinUI" Version="3.0.19" />
<PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="5.0.19" />
<PackageVersion Include="Uno.Resizetizer" Version="1.2.1" />

<PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.2.0-dev.24" />
<PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.36" />
<PackageVersion Include="Uno.WinUI" Version="5.2.0-dev.24" />
<PackageVersion Include="Uno.WinUI.Lottie" Version="5.2.0-dev.24"/>
<PackageVersion Include="Uno.WinUI.RemoteControl" Version="5.2.0-dev.24" />
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.9.0.2" />
<PackageVersion Include="Mapsui.Uno.WinUI" Version="4.1.2" />
<PackageVersion Include="Uno.Extensions.Reactive.Messaging" Version="2.5.11" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageVersion Include="Uno.WinUI.Svg" Version="5.0.41" />
<PackageVersion Include="SkiaSharp.Views.Uno" Version="2.88.6" />

Affected platforms

iOS

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@mcocaroUX mcocaroUX added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Feb 6, 2024
@dr1rrb
Copy link
Member

dr1rrb commented Feb 14, 2024

This might have been fixed by #15294, could you please validate if it has been fixed in the latest version of uno?

Also, I noticed that you subscribed only the the PointerReleased event, but this can legitimately not been raised on element. You should always listen to PointerCancelled to be sure to handle all cases.

@mcocaroUX
Copy link
Author

Hey @dr1rrb, I just tried on UNO 5.1.52 but I can still replicate the issue, same is ocurring with PointerCanceled

@jeromelaban
Copy link
Member

@mcocaroUX can you validate using the latest prerelease build of 5.2-dev.xx?

@mcocaroUX
Copy link
Author

Tested on 5.2.0-dev.660, issue still ocurring

@MartinZikmund MartinZikmund added project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...) difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Feb 26, 2024
@dr1rrb
Copy link
Member

dr1rrb commented Mar 12, 2024

@mcocaroUX So I investigated the issue and, with latest version of uno, the behavior is the same as windows: the event is flagged as handled so the handler is not invoked. The issue is actually that you get the PointerReleasedEvent on Android (not tested on other platforms).

To get the event, you have to subscribe to handled event too using:

slider.AddHandler(PointerReleasedEvent, new PointerEventHandler(Slider_PointerReleased), handledEventsToo: true);

(works on all platforms)

-- Updating the title of the issue accordingly --

@dr1rrb dr1rrb changed the title [iOS] [Slider] PointerReleased doesn't trigger [Android] [Slider] PointerReleased not flagged as handled Mar 12, 2024
@mcocaroUX
Copy link
Author

@dr1rrb What version did you use to test it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...) project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers
Projects
None yet
Development

No branches or pull requests

4 participants