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

[WASM] CapturePointer did not work properly in firefox #11100

Closed
easy28 opened this issue Jan 30, 2023 · 1 comment · Fixed by #17633
Closed

[WASM] CapturePointer did not work properly in firefox #11100

easy28 opened this issue Jan 30, 2023 · 1 comment · Fixed by #17633
Assignees
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/regression Something was working, now it isn't low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact. platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform 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

@easy28
Copy link

easy28 commented Jan 30, 2023

Current behavior

CapturePointer did not work in firefox, when Uno.UI / Uno.UI.WebAssembly Version >=4.6.0-dev.393 . before this version or in chrome/edge, it's working fine.

Below code reproduce the issue , when press the Rectangle and move outside the Rectangle, "gRoot_PointerMoved" show up in the log console , which means the CapturePointer did not work.

<Grid Width="400" Height="400" Background="Aqua" x:Name="gRoot" PointerMoved="gRoot_PointerMoved" >       
       <Rectangle x:Name="rTest" Fill="#80b8964e" StrokeThickness="2"
              Stroke="#ccb8964e" Width="200" Height="200"
              PointerPressed="RTest_PointerPressed" 
              PointerMoved="RTest_PointerMoved" 
              PointerReleased="RTest_PointerReleased" >
        </Rectangle>  
</Grid>
        bool bCaptured;
        private void RTest_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            bCaptured = rTest.CapturePointer(e.Pointer);
            e.Handled = true;
            Console.WriteLine("RTest_PointerPressed:" + e.OriginalSource + "," + bCaptured);
        }

        private void RTest_PointerMoved(object sender, PointerRoutedEventArgs e)
        {
            if (bCaptured)
            {
                Console.WriteLine("RTest_PointerMoved:" + e.OriginalSource + "," + bCaptured);
                e.Handled = true;
            }
        }

        private void RTest_PointerReleased(object sender, PointerRoutedEventArgs e)
        {
            if (bCaptured)
            {
                Console.WriteLine("RTest_PointerReleased:" + e.OriginalSource + "," + bCaptured);
                rTest.ReleasePointerCapture(e.Pointer);
                bCaptured = false;
            }
        }


        private void gRoot_PointerMoved(object sender, PointerRoutedEventArgs e)
        {
            if (bCaptured)
            {
                Console.WriteLine("gRoot_PointerMoved:" + e.OriginalSource + "," + bCaptured);
                e.Handled = true;
            }
        }

Expected behavior

CapturePointer work properly in firefox

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

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

Uno.UI / Uno.UI.WebAssembly Version >=4.6.0-dev.393 in firefox

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@easy28 easy28 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 Jan 30, 2023
@Youssef1313 Youssef1313 added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers kind/regression Something was working, now it isn't labels Jan 30, 2023
@jeromelaban jeromelaban removed kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Jan 30, 2023
@easy28 easy28 changed the title [wasm] CapturePointer did not work properly in firefox [WASM] CapturePointer did not work properly in firefox Jan 30, 2023
@MartinZikmund MartinZikmund changed the title [WASM] CapturePointer did not work properly in firefox [WASM] CapturePointer did not work properly in firefox Aug 23, 2023
@MartinZikmund MartinZikmund added 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 low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact. and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Aug 23, 2023
@dr1rrb dr1rrb self-assigned this Jul 29, 2024
@agneszitte
Copy link
Contributor

agneszitte commented Sep 4, 2024

@jhanvi03 not sure if you were able two weeks ago to do regression tests for this issue please
I will let you share feedback and don't hesitate to come back to @dr1rrb if you need additional info or specifics
Thanks in advance

@agneszitte agneszitte assigned jhanvi03 and unassigned dr1rrb Sep 4, 2024
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/regression Something was working, now it isn't low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact. platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform 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

Successfully merging a pull request may close this issue.

7 participants