Combobox steals focus and switches tabs

4 posts, 0 answers
  1. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 03 Jan Link to this post

    version 2016.3.1024.45

     

    I have two tabs with a radcombobox on each tab. Sometimes clicking on one radcombobox is changing my tab selection and putting focus on the other radcombobox. This only occurs with radcomboboxes, not with regular comboboxes.

     

    Steps
    - the radcombobox 1 on tab 1 is selected and focused (not sure the exact state, its difficult to reproduce)
    - the user switches to tab 2 and clicks on the radcombobox 2 
    - the combobox 1 grabs the focus and the tab switches back to tab 1

    and vice versa

     

    Why does the combobox on the inactive tab grab the focus back?
    Does the radcombobox not know when it is on not active tab?

    How can I prevent the radcomboboxes from changing my tab selection?

     

  2. Nasko
    Admin
    Nasko avatar
    679 posts

    Posted 06 Jan Link to this post

    Hi Jen,

    We have tried to reproduce the issue on our side using the provided by you description and steps, but with no success - it seems everything is working as expected. That is why we would like to ask you for more information about your scenario. Are you using the native WPF TabControl or RadTabControl to place the ComboBoxes inside their tabs? Do you have nested TabControls? Sharing the XAML of your view will also be of great help.

    Attached you could find the project we used for our investigation following the provided steps.

    Could you please modify the project  in order to reproduce the issue - that will help us to better understand your scenario and provide you with the best possible solution?

    We are looking forward to hearing from you.

    Regards,
    Nasko
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 06 Jan in reply to Nasko Link to this post

    Thanks for the project. I have determined you can reproduce the issue if you use the native tab control and place the radComboboxes into radToolBars.

     

            <TabControl >
                <TabItem Header="Tab 1">
                    <telerik:RadToolBar  VerticalAlignment="Top">
                        <Label Content="tab one" Margin="3"/>
                        <telerik:RadComboBox Width="125"  Margin="3"
                                         DataContext="{StaticResource MyViewModel}"
                                         ItemsSource="{Binding Cars}"
                                         DisplayMemberPath="Make" />
                    </telerik:RadToolBar>
                </TabItem>
                <TabItem Header="Tab 2">
                    <telerik:RadToolBar  VerticalAlignment="Top">
                        <Label Content="tab two" Margin="3"/>
                        <telerik:RadComboBox Width="125"  Margin="3" 
                                         DataContext="{StaticResource MyViewModel}"
                                         ItemsSource="{Binding Cars}"
                                         DisplayMemberPath="Make" />
                    </telerik:RadToolBar>
                </TabItem>
            </TabControl>

  4. Nasko
    Admin
    Nasko avatar
    679 posts

    Posted 09 Jan Link to this post

    Hello Jen,

    Thank you for the provided code-snippet. We were able to reproduce the described by you issue. However, we could not tell for sure if RadComboBox is causing it as it could be reproduced with other controls as well (like RadDropDownButton). We suggest you to consider using RadTabControl instead of the native TabControl - it provides additional features and does not cause the observed issue (as it could not be reproduced in RadTabControl, also we consider the issue might be caused by the native TabControl).

    If RadTabControl does not work for you, please let us know and we will try to provide you with another solution.

    Hope this helps.

    Regards,
    Nasko
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top