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

NumericUpDown selection bugs on spinner click #18110

Open
zii-dmg opened this issue Feb 3, 2025 · 0 comments
Open

NumericUpDown selection bugs on spinner click #18110

zii-dmg opened this issue Feb 3, 2025 · 0 comments
Labels

Comments

@zii-dmg
Copy link
Contributor

zii-dmg commented Feb 3, 2025

Describe the bug

In NumericUpDown something wrong with text selections on spinner clicks.
Tested with Fluent theme.

  1. First click on spinner with string format "G0" when numeric not focused -> text selected
  2. Second click on spinner (numeric has focus) -> text lost selection
AvaNumericUpDown1.mp4

Click on spinner with default string format when numeric not focused -> text length grows but only previous text size selected

AvaNumericUpDown2.mp4

Click and hold on spinner when numeric not focused -> text selected, but when text length grows only previous text size selected

AvaNumericUpDown3.mp4

To Reproduce

Create NumericUpDown and some control to change focus. Then click on spinners as described above.

<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:local="using:AvaTest"
        mc:Ignorable="d"
        Width="600" Height="400"
        x:Class="AvaTest.MainWindow"
        FontSize="30"
        Title="AvaTest">
    <StackPanel Spacing="6" Margin="6" Width="200">
        <NumericUpDown Value="0"/>
        <NumericUpDown Value="0" FormatString="G0"/>
    </StackPanel>
</Window>

Expected behavior

Text should be always and fully selected on any spinner click OR text should be always not selected on any spinner click.
In Qt 5 text fully selected on every spinner click.
In GTK 3 text not selected on any spinner click.

Avalonia version

11.2.3

OS

Windows

Additional context

No response

@zii-dmg zii-dmg added the bug label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant