This is a migrated thread and some comments may be shown as answers.

Not showing focus state when using TAB navigation

11 Answers 316 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 16 Sep 2008, 09:36 AM
Hello,

When I have a RadComboBox on a form with multiple other controls and I navigate through the form using the TAB-key, the RadComboBox get's focus, but visually the ComboBox remains in the unfocused state.

It seems like the 'MouseOver' visaul state is set, but the 'Focussed' visual state is not set. Quite annoying if you have multiple RadComboBoxes on one page and like to navigatie using the TAB-key. You can't see which item you have focus on.

Any ideas on how to fix this? I want the RadComboBox to light up when it gets focus, both on MouseOver and with Focus (using TAB).

Thanks!

11 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 16 Sep 2008, 11:57 AM
Hi Rob,

The problem is that when IsEditable = false, RadComboBox contains a ToggleButton, which has its IsTabStop property set to false, which prevents it from getting focus and properly displaying its focused state, which actually is the focused state of the combo box itself. The IsTabStop property has to be false, because otherwise, the button will get focus and will break the keyboard navigation logic of RadComboBox. We are aware of that problem and it will definitely be fixed in one of the next updates of RadControls for Silverlight before the official release in the beginning of November.

As a temporary workaround I would suggest setting IsEditable=true and also IsReadOnly=true. This will slightly change the appearance of RadComboBox, but will "fix" the problem with the focused state.

Sincerely yours,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 07 Feb 2009, 09:54 PM

I'm having a similar issue where selecting an item in combobox  then hitting Enter progresses through the controls as intended, but hitting Tab (preferred) instead throws focus "somewhere" out in the brower, but not on any of the controls.  I'm using code like this in my OnSelectedIndexChange handlers:

 

RadAjaxManager1.FocusControl(this.radtxtFirstName.ClientID + "_text");  
 

 

Any thoughts?

 

Thanks

Mark

0
Valeri Hristov
Telerik team
answered on 09 Feb 2009, 07:25 AM
Hi Mark,

I suppose that your question is about RadComboBox for ASP.NET. Could you please, post it in its forum
http://www.telerik.com/community/forums/aspnet/combobox.aspx

or, if I am mistaken, provide some more information about your scenario. In the best case this would be a simple sample application that could help us observe the problem.

Regards,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hwsoderlund
Top achievements
Rank 1
answered on 13 Nov 2009, 09:21 AM
I just noticed that there are still no real Focused/Unfocused states for the combo box.The "FocusStates" visual state group is not present in the control template. Will this be adressed anytime soon?
0
hwsoderlund
Top achievements
Rank 1
answered on 13 Nov 2009, 09:31 AM
Oh, and there is also a problem with the suggested workaround: When IsEditable and IsReadOnly are true, the space bar no longer expands/collapses the combo box. Is there another way to open the combo box using the keyboard?
0
Valeri Hristov
Telerik team
answered on 13 Nov 2009, 12:24 PM
Hello Henrik,

We are aware of the lack of focus states in the present version of RadComboBox. This is going to be fixed in the internal build next week and officially in SP1 in the beginning of December.

Regarding the toggling the combobox dropdown with space in read-only editable mode - since the space could be used for autocomplete, we decided to stop using it for toggling the dropdown. You could use Page Down instead, when the dropdown is closed and Enter/Escape when the dropdown is open.

Best wishes,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
hwsoderlund
Top achievements
Rank 1
answered on 13 Nov 2009, 01:09 PM
Yes, I suppose you are right about the space bar. And I did not know that pagedown could be used, so that is OK. Nice to hear that the focus visual will be in place so soon. I also found the same issue in RadMenu, but I will write a separate post about that.

Just a general accessibility question, not directly related to Telerik or even Silverlight: Do you know if the pagedown/pageup keys are commonly used for expanding/collapsing comboboxes etc? I mean, would a disabled person who use the keyboard exclusively be aware that these keys should be used for that purpose?

Best regards,
/Henrik
0
Valeri Hristov
Telerik team
answered on 18 Nov 2009, 10:17 AM
Hi Henrik,

The standard WPF combo box uses F4 as a shortcut for opening the dropdown. If I remember correctly, we had problems with this shortcut in the early versions of Silverlight 2, hence we decided to use different shortcuts - Space and PgDown. I really don't know how comfortable and intuitive will be the usage of PgDown or F4, so I am open for suggestions. On the other hand, the Q3 combo has a property OpenDropDownOnFocus, which might be of help in your case.

All the best,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
krishna surapaneni
Top achievements
Rank 2
answered on 19 Nov 2009, 06:35 AM
Hi,
I Suggest you to change the Visual State of the RadComboBox

The following code is little bit helpful

 
 public class RdComboBox : RadComboBox 
    { 
        public RdComboBox() {  
        } 
        protected override void OnGotFocus(RoutedEventArgs e){ 
            base.OnGotFocus(e); 
            VisualStateManager.GoToState(this, "MouseOver", true); 
        } 
    } 

and Use RdComboBox Instead of RadComboBox it shows the Focused State


0
hwsoderlund
Top achievements
Rank 1
answered on 23 Nov 2009, 01:49 PM
OpenDropDownOnFocus feels unexpected, at least to me. But I noticed that in the latest internal build you have fixed the FocusVisual and also the "toggle on spacebar" functionality. Personally I tend to always try the space bar first when something needs toggling. So thank you for that!
0
hwsoderlund
Top achievements
Rank 1
answered on 23 Nov 2009, 01:50 PM
Krishna: Thanks for the tip!
Tags
ComboBox
Asked by
Rob
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Mark
Top achievements
Rank 1
hwsoderlund
Top achievements
Rank 1
krishna surapaneni
Top achievements
Rank 2
Share this question
or