-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Strange behavior of cursor after PointerPressed
and ShowDialog
(Linux)
#15281
Comments
No more reproduce in Ubuntu 23.10 with installed packages:
UPD: was wrong, steel same behaviour |
Hi, I'm having the same issue.Have you solved it? |
Can confirm that this is happening for me on both Linux (Debian) and macOS as well. |
@pawn86, @jonko0493 as a workaround for this issue, you can Example: private void Link_OnPointerPressed(object? sender, PointerPressedEventArgs e)
{
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
return;
if (Equals(sender, Link1))
_linkInfo1.Navigate(e);
else
_linkInfo2.Navigate(e);
// workaround
if ( RuntimeInformation.IsOSPlatform( OSPlatform.Linux ) || RuntimeInformation.IsOSPlatform( OSPlatform.OSX) )
e.Pointer.Capture( null );
e.Handled = true;
} |
Same here (macOS) |
Debian arm64,bug! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I catch
PointerPressed
event ofInputElement
(testing onTextBlock
andContentPresenter
) and showing dialog window, I got strange behavior of pointer like it is still pointing to theInputElement
.To Reproduce
I define interface
ILinkInfo
which has methodNavigate
. In implementations of method I can navigate through application and opening windows:I got
Window.xaml
with twoTextBlock's
which imitatingLink
behaviour:In code behind of
MainWindow
I catchPointerPressed
event ofTextBlock's
and callingNavigate
method ofILinkInfo
:And when I'm click to the
TextBlock
, which open window, I getting behaviour of cursor like this:It seems like application think that I'm steel pointed to the
TextBlock
.I publish this code to GitHub repo
Expected behavior
InputElement
should be not pointed after closingWindow
Avalonia version
release: 11.0.10
night: 11.2.999-cibuild0047060-alpha
OS
Linux (Ubuntu 23.10)
Additional context
This is can be reproduce only on
Linux
. OnWindows
it handles like it should be.I testing this behaviour on cathing
Tapped
event and I got right behaviour. But it this strange thing that I can't repoduce this inPointerPressed
event handler. And also in my application I should usePointerPressed
event to mark it handled if I navigate through application.The text was updated successfully, but these errors were encountered: