I'm not able to get my RadComboBox to blur when interacting with the mouse. I have the control extended to incorporate a RadTreeView (as in http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/treeviewcombobox/defaultcs.aspx?product=combobox), with some enhancements.
I have 2 use cases:
1) A user types text and the treeview is filtered as they type (all my code). They can use the arrows keys to change selections in the TreeView and hit enter to select it. The selection doesn't actually go into the ComboBox because I allow multiple selections, so after they hit enter, the item they selected is added to a table and focus drops.
After this, the ComboBox shows its empty message and the cursor disappears from the input area of the ComboBox.
2) A user types text and the treeview is filtered (as above). They can use the mouse to click an item and add it to the list.
After this, the ComboBox closes but the empty message doesn't not show. The cursor is in an empty input region in the ComboBox.
My goal is for case #2 to also drop focus on the combobox after they click, but no matter what I do, I can't get the combobox to blur until I click elsewhere on the page with the mouse.
I've tried the solutions offered in http://www.telerik.com/community/forums/aspnet-ajax/combobox/removing-combobox-focus.aspx and have tried calling this function after the item is clicked:
The function executes but nothing ever changes in the combobox.
I can't just set focus elsewhere on the page - that doesn't make sense. I just want to blur the combobox so its state resets.
How can I do this?
I have 2 use cases:
1) A user types text and the treeview is filtered as they type (all my code). They can use the arrows keys to change selections in the TreeView and hit enter to select it. The selection doesn't actually go into the ComboBox because I allow multiple selections, so after they hit enter, the item they selected is added to a table and focus drops.
After this, the ComboBox shows its empty message and the cursor disappears from the input area of the ComboBox.
2) A user types text and the treeview is filtered (as above). They can use the mouse to click an item and add it to the list.
After this, the ComboBox closes but the empty message doesn't not show. The cursor is in an empty input region in the ComboBox.
My goal is for case #2 to also drop focus on the combobox after they click, but no matter what I do, I can't get the combobox to blur until I click elsewhere on the page with the mouse.
I've tried the solutions offered in http://www.telerik.com/community/forums/aspnet-ajax/combobox/removing-combobox-focus.aspx and have tried calling this function after the item is clicked:
function
BlurComboBox(comboBox) {
if
(comboBox.get_dropDownVisible() && comboBox.get_closeDropDownOnBlur())
comboBox.hideDropDown();
comboBox.get_tableElement().className =
""
;
comboBox._selectItemOnBlur();
comboBox.get_inputDomElement().blur();
comboBox._raiseClientBlur(window.event);
comboBox._focused =
false
;
}
The function executes but nothing ever changes in the combobox.
I can't just set focus elsewhere on the page - that doesn't make sense. I just want to blur the combobox so its state resets.
How can I do this?