AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
746 stars 148 forks source link

IME BUG:After scrolling, the Chinese input method does not work properly #352

Open chenzanyu opened 1 year ago

chenzanyu commented 1 year ago

I have a large line of text and cannot type Chinese properly after scrolling

chenzanyu commented 1 year ago
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:vm="clr-namespace:BUGDemo.ViewModels"
             xmlns:AvaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="BUGDemo.Views.MainView"
             x:DataType="vm:MainViewModel">
  <Design.DataContext>
    <!-- This only sets the DataContext for the previewer in an IDE,
         to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
    <vm:MainViewModel />
  </Design.DataContext>

    <Grid>
        <AvaloniaEdit:TextEditor  x:Name="testTextBox" FontFamily="Cascadia Code,Consolas,Menlo,Monospace"/>
    </Grid>

</UserControl>
chenzanyu commented 1 year ago
using Avalonia.Controls;
using System.Collections.Generic;
using System.Linq;

namespace BUGDemo.Views;

public partial class MainView : UserControl
{
    public MainView()
    {
        InitializeComponent();
        setTestTextBoxText();
    }

    private void setTestTextBoxText()
    {
        testTextBox.Text = string.Join("\r\n", Enumerable.Range(0, 5000).Select(x => x.ToString()));
    }
}
chenzanyu commented 1 year ago

https://github.com/AvaloniaUI/AvaloniaEdit/assets/35652064/677ee0a9-b292-4b5c-9264-6375a332e614

chenzanyu commented 1 year ago

After rolling, you cannot enter Chinese.When you click outside the Application, you can enter Chinese normally, but the IME is placed at the bottom of the screen

danipen commented 1 year ago

@Gillibald is this one on you ToDo?

Gillibald commented 1 year ago

It is but I will not be able to work on this for the next 3 weeks and will most likely very busy working on other things after that time frame.

DWVoid commented 10 months ago

How are things going on this issue? In the current 11.0.5 release the IME window position is still incorrect unless the text is scrolled to the top left position, and after dragging the scrolllbar to scroll IME does not activate anymore.