FluentAvalonia icon indicating copy to clipboard operation
FluentAvalonia copied to clipboard

Text disappears from Editable TextBox

Open mrj001 opened this issue 10 months ago • 0 comments

Using the following XAML to define a main window:

<Window 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:fa="using:FluentAvalonia.UI.Controls"
     mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="400"
     Width="400" Height="400"
     x:Class="ComboBox.MainWindow"
     Title="ComboBox">
  <StackPanel Orientation="Vertical">
    <TextBlock Text="An editable ComboBox:" Margin="5,5,0,0" />
    <fa:FAComboBox Name="ComboBox"
          Margin="10,5,0,0"
          IsEditable="true"
          >
      <fa:FAComboBoxItem Content="One" />
      <fa:FAComboBoxItem Content="Two" />
      <fa:FAComboBoxItem Content="Three" />
      <fa:FAComboBoxItem Content="Four" />
      <fa:FAComboBoxItem Content="Five" />
    </fa:FAComboBox>
    <TextBlock Text="A TextBox:" Margin="5,10,0,0" />
    <TextBox Name="TextBox" Margin="10,5,0,0" />
  </StackPanel>
</Window>

Click in the editable area of the FAComboBox. Type some text ( eg. "Pi"). Click in the TextBox (or tab to it). Observe that the text in the ComboBox disappears. Put focus back on the ComboBox. The text reappears. Shift the focus away, and the text disappears again. Go back and the text reappears.

Next, select an item from the dropdown list. This does not disappear when shifting focus away from the FAComboBox.

Next, type some text in the FAComboBox. Now, when focus is shifted away from it, the text no longer disappears.

Desktop/Platform (please complete the following information):

  • OS: Linux (Armbian 24.2.1 bookworm)
  • FluentAvalonia Version: 2.0.5 and 2.1.0-preview1
  • Avalonia Version: 11.0.10 and 11.1.0-beta1

mrj001 avatar Mar 30 '24 20:03 mrj001