Page 1 of 1

Weird focusing on TabControl

Posted: 27 Jun 2017, 06:45
by nikobarli
Using the below XAML test code:
        <TabControl>
            <TabItem Header="Tab1"><TextBox></TextBox></TabItem>
            <TabItem Header="Tab2"><TextBox></TextBox></TabItem>
            <TabItem Header="Tab3"><TextBox></TextBox></TabItem>
            <TabItem Header="Tab4"><TextBox></TextBox></TabItem>
        </TabControl>
I observed several weird behaviors:

1. Repeatedly typing Shift-Tabs change the selection of tabs, but only between Tab3 and Tab4
2. Click on Tab1 header, then type Tab -> the focus doesn't move to the textbox of Tab1
3. Click on Tab1's textbox to move the focus, then type Tab -> the tab selection is changed to Tab2, focus is on header ?
4. Click on Tab2/3/4's textbox to move the focus, then type Tab -> the tab selection is change to Tab1, focus is on header ?

Re: Weird focusing on TabControl

Posted: 29 Jun 2017, 23:54
by sfernandez
I was able to reproduce the strange behavior.
Could you please create a ticket in our bugtracker, we will review the keyboard focus navigation and fix it.

Re: Weird focusing on TabControl

Posted: 30 Jun 2017, 02:43
by nikobarli
Thanks. I filed the issue here: https://bugs.noesisengine.com/view.php?id=1121

Re: Weird focusing on TabControl

Posted: 10 Jul 2019, 07:24
by nikobarli
Hi, I just verified this bug. It seems to fixed the behavior when I enter Tab repeatedly. The focus is go back and forth between the Tab header and the content TextBox.

But, when I enter Shift-Tab repeatedly, the behavior is different. Once the focus on the Tab header, the focus stays there forever.

I am not having a problem with this behavior now, but if the fix is easy, you may want to fix that as well.

Re: Weird focusing on TabControl

Posted: 12 Jul 2019, 12:56
by sfernandez
I see what you are saying, I compared the behavior in WPF and Noesis with the following xaml:
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
        <Button Content="Button 1"/>
        <TabControl Margin="0,20">
            <TabItem Header="Tab1">
                <Button Content="Button Tab 1" Margin="20"/>
            </TabItem>
            <TabItem Header="Tab2">
                <Button Content="Button Tab 2" Margin="10"/>
            </TabItem>
        </TabControl>
        <Button Content="Button 2"/>
    </StackPanel>
</Grid>
  • In WPF pressing Shift+Tab will jump from "Button 2" to "Button Tab 1", then "TabControl", and finally "Button 1";
  • In Noesis it will go from "Button 2" to "TabControl" and finally to "Button 1", we are incorrectly skipping the content of the TabItem when moving focus backwards.
Could you please report this in our bugtracker?

Re: Weird focusing on TabControl

Posted: 16 Jul 2019, 09:04
by nikobarli

Re: Weird focusing on TabControl

Posted: 16 Jul 2019, 10:28
by sfernandez
Thanks for the report.