I have a form including a WebDropDown control which is otherwise working fine. I recently changed the default Focus() fo rthe form to be the drodown control, and it seem sot misbehave in this circumstance.
When focus is set by default, the caret is at the END of the default text inth e control, which means that NO KEYBOARD selection is possible untilt heuser either tabs out an then back in (which selects all the text in the control), or uses the mouse to drop down the list.
On occasion (in IE) the whole contol seems unresponsive, but I haven't isolated whether that is a localised issue or something else.
This ONLY occurs when the control has the default focus for a form. Tabbing in and out of a dropdown that is part of a larger data entry set works fine.
This seems similar to other issues reported here, but with a different cause. Is this a bug or what?
Hi,
Thank you for your feedback. About the unresponsiveness under IE, I am not sure what could be the cause without looking at some isolated code that reproduces this issue. It could be actually many things, but it could be related to number of dropdowns on the form and number of items on them. If you can suggest these numbers to me, i can try to help with some performance improvements.
About the caret at the end of the text when there is default focus, I don't know how you are setting the initial focus in the control, but I can suggest a workaround using the Initialize/Focus client-side event:
sender._elements["Input"].select();
This will make sure that the whole text is selected, so that the end user can start typing directly without doing any other actions.
Hope it helps,
Angel
I also had this issue and that did do what I wanted, however in Safari the onMouseUp event of the input cancels the selection and puts the cursor back the end again; so to fix this I added a delay with:
setTimeout(function () { sender._elements["Input"].select(); }, 50);
and this fixed it for safari.
regards,
Andrew
That suggestion worked, thanks (the intialise event particularly).
The combo is populated using the datasource property in the Page_Load event from a business object collection (List<>) of only 3-4 items. Its the third control on that particular page, but the first two are set as readonly (they are primary keys). the user selects the "type" of form that will be entered using the combo and I open the approriate panel using the ValueChanged event
In the original code, you can see the caret at the start of the default text in the combo as the form loads, and as everything else initialises (the IDE slows this down) you distinctly see the caret move to the END of the text in the combo, without actually selecting the contents, whcih is what one would expect from "focus"
Did Angel's suggestion about the caret help? I was also curious how large the dataset you were using is. Please let me know if you still need assistance. Thank you.
Sincerely,Duane