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

[Windows] Editor: Text selection glitchy on subsequent lines #25950

Open
formerlymisterhenson opened this issue Nov 19, 2024 · 5 comments
Open
Assignees
Labels
area-controls-editor Editor i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@formerlymisterhenson
Copy link

formerlymisterhenson commented Nov 19, 2024

Description

In the MAUI Editor component on Windows, a glitch occurs with text selection. While the first line of text behaves as expected, subsequent lines exhibit an issue where parts of the text remain highlighted, even after the selection is cleared.

Steps to Reproduce

out.mp4

Link to public reproduction project repository

No response

Version with bug

9.0.0 GA

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.0-rc.2.24503.2

Affected platforms

Windows

Affected platform versions

Windows 10

Did you find any workaround?

No response

Relevant log output

@formerlymisterhenson formerlymisterhenson added the t/bug Something isn't working label Nov 19, 2024
@formerlymisterhenson formerlymisterhenson changed the title [iOS] Editor: Text selection glitchy on subsequent lines [Windows] Editor: Text selection glitchy on subsequent lines Nov 19, 2024
@samhouts samhouts added platform/windows 🪟 potential-regression This issue described a possible regression on a currently supported version., verification pending area-controls-editor Editor labels Nov 19, 2024
@kevinxufei kevinxufei added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version labels Nov 20, 2024
@kevinxufei
Copy link

kevinxufei commented Nov 20, 2024

I can repro this issue at Windows platform on the latest 17.13 Preview 1(9.0.0), but it works fine on 9.0.0-rc.2.24503.2 & 8.0.3.
Sample project: https://github.com/rachelkang/recipeSearch.git
Image

@kevinxufei kevinxufei removed the potential-regression This issue described a possible regression on a currently supported version., verification pending label Nov 20, 2024
@PureWeen PureWeen added this to the .NET 9 SR1.1 milestone Nov 20, 2024
@formerlymisterhenson
Copy link
Author

Well for others dealing with the same problem, I found a workaround:

#if WINDOWS
        Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("SelectionChanged", (handler, view) =>
        {
            handler.PlatformView.SelectionChanged += 
            new Microsoft.UI.Xaml.RoutedEventHandler((object sender, Microsoft.UI.Xaml.RoutedEventArgs e) =>
            {
                handler.PlatformView.UpdateBackground(view);
            });
        });
#endif

@Foda
Copy link
Member

Foda commented Nov 25, 2024

Hello! This is a regression caused by WinUI in the latest WinAppSDK. Please follow the issue here: microsoft/microsoft-ui-xaml#10071

@PureWeen PureWeen modified the milestones: .NET 9 SR1.1, .NET 9 SR2 Nov 25, 2024
@AlexanderBlackman
Copy link

Well for others dealing with the same problem, I found a workaround:

#if WINDOWS
        Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("SelectionChanged", (handler, view) =>
        {
            handler.PlatformView.SelectionChanged += 
            new Microsoft.UI.Xaml.RoutedEventHandler((object sender, Microsoft.UI.Xaml.RoutedEventArgs e) =>
            {
                handler.PlatformView.UpdateBackground(view);
            });
        });
#endif

Does anyone know the equivalent for WinUI 3?

@PureWeen PureWeen modified the milestones: .NET 9 SR2, .NET 9 SR3 Nov 26, 2024
@PureWeen
Copy link
Member

This will be fixed in future WinUI servicing release.
With the holidays it'll probably be January time line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-editor Editor i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

6 participants