-
Notifications
You must be signed in to change notification settings - Fork 154
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
Hovering over hyperlinks results in permanent hand cursor over control, and click not working. #133
Comments
For clicks, it seems that we need to add and implement an event handler. EventLog.AddHandler(AvaloniaEdit.Rendering.VisualLineLinkText.OpenUriEvent, (s, e) => {
var url = e.Uri;
// It checks on windows only.
// If you want to run on another system, see https://github.com/dotnet/runtime/issues/17938
Process.Start(new ProcessStartInfo { FileName = url.ToString(), UseShellExecute = true });
}); |
This seems to work, and I see your commit for fixing the cursor. Only issue for me now, is that the default link regex in LinkElementGenerator is designed to exclude punctuation at the end of a URI, and most of the links in my use case end with a ')' character that is being excluded. Forking and fixing myself for now, as that character is absolutely necessary. Thanks! |
Partially fixed here (already merged): Not fully fixed cause I noticed that Avalonia doesn't doesn't fill the For example, moving the mouse hover a control with the left Curious that once you perform a pointer click holding the Ctrl key, then the subsequent |
Hi, any news here? That would be helpful to fix: |
Tested with latest NuGet package (0.10.0) of AvalonEdit as well as a build of the branch as of today. Avalonia version is 0.10.2 (nuget).
I've enabled hyperlinks, and now whenever my mouse encounters a hyperlink on the control, from that point forward any time the mouse is hovering over the edit control (over the hyperlink or not), it's the hand cursor not the arrow cursor. Clicking the hyperlink is also not functioning.
My TextEditorOptions:
EventLog.Options.EnableHyperlinks = true; EventLog.Options.RequireControlModifierForHyperlinkClick = false;
My editor XAML:
<ae:TextEditor Name="EventLog" Height="390" Width="565" Margin="5" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" IsReadOnly="True" SyntaxHighlighting="EventLogSH" />
The text was updated successfully, but these errors were encountered: