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

On Demand ComboBox losing focus when drop-down drawing above text box

5 Answers 144 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thomas Mittag
Top achievements
Rank 1
Thomas Mittag asked on 30 Sep 2012, 07:20 PM
I am having an issue with a RadComboBox on a page.  The combo box is set up to use OnDemand loading. 
In IE8, when the drop-down is in the lower part of the page, the combo box is losing the focus in the input field when the On Demand list is being refreshed and the Drop-down box is rendered above the input field.

This is causing issues, because when the focus is lost and the user pressed the backspace button the browsers back button appears to be invoked, navigating the user away from the page.

Is there a way to set the focus back to the input control after the on demand items are retrieved?

Thanks
Thomas Mittag

5 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 01 Oct 2012, 03:15 PM
Hi Thomas,

I tried to replicate the experienced problem, but to no avail. Could you provide us the implementation of the RadComboBox at your end or open a support ticket along with a runnable sample which demonstrates the problematic behavior?

Kind regards,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Thomas Mittag
Top achievements
Rank 1
answered on 01 Oct 2012, 05:45 PM
After debugging a bit more I have determined that it actually happens when the drop-down switches postion. For example as described in the post above, when the drop-down is further down in the page, assuming the user has entered an invalid filter string, the drop down will appear below the input field because the list is empty and does not requires very much space. When the user begins to press backspace and with the reduced filter string, items begin to appear in the drop-down it flips to above the input field due to space restrictions below the input field, and that is when the focus is lost.
I have done some debugging in the telerik scripts, and if I do a $(mycbo.get_inputDomElement()).focus() after function_positionDropDown() in RadComboBox it works correctly.

Regards
Thomas
0
Nencho
Telerik team
answered on 02 Oct 2012, 12:52 PM
Hi Thomas,

Thank you for getting back to us.

I am glad to hear that you solved the problem yourself. Please, do not hesitate to contact us again if you have further questions.

Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Thomas Mittag
Top achievements
Rank 1
answered on 02 Oct 2012, 12:58 PM
Nencho,

I would not consider this a solution, rather a workaround at this point. I do believe there is a bug in the RadComboBox.js script when invoking function _positionDropDown in your tools and it should be fixed by your development team.

Regards
Thomas
0
Kalina
Telerik team
answered on 05 Oct 2012, 01:21 PM
Hi Thomas Mittag,

In order to investigate the issue at debug the RadComboBox code - we need to reproduce it locally.
For this purpose we need a clear test case.

Could you please open a support ticket and send us a simplified compilable web page where we will be able to observe the issue?
Thank you in advance for your collaboration.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Thomas Mittag
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Thomas Mittag
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or