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

ComboBox jumps in ScrollViewer in browser #18203

Open
yll690 opened this issue Feb 15, 2025 · 0 comments
Open

ComboBox jumps in ScrollViewer in browser #18203

yll690 opened this issue Feb 15, 2025 · 0 comments
Labels

Comments

@yll690
Copy link
Contributor

yll690 commented Feb 15, 2025

Describe the bug

If I put a ComboBox in a ScrollViewer, and click the ComboBox after it selected a value, the ComboBox will jump up and down. On windows there is no such problem.

Image

To Reproduce

Create a new multi-platform project that includes browser(and desktop) and input something like this, run the browser project and click the ComboBox. You should see same behavior like the gif.

<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:AvaloniaApplication1.ViewModels"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="AvaloniaApplication1.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>

  <ScrollViewer Width="500" Height="300">
    <StackPanel>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <ComboBox>
        <ComboBoxItem Content="1"/>
        <ComboBoxItem Content="2"/>
        <ComboBoxItem Content="3"/>
        <ComboBoxItem Content="4"/>
        <ComboBoxItem Content="5"/>
        <ComboBoxItem Content="6"/>
        <ComboBoxItem Content="7"/>
        <ComboBoxItem Content="8"/>
        <ComboBoxItem Content="9"/>
      </ComboBox>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
      <TextBlock Text="111"/>
    </StackPanel>
  </ScrollViewer>

</UserControl>

Expected behavior

No response

Avalonia version

11.2.3

OS

WebAssembly

Additional context

No response

@yll690 yll690 added the bug label Feb 15, 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