Scenario:I have a RadCombobox and I have attached functions to most of the events. One event of the combobox is OnClientBlur and I am using this to check whether value in Combo is "Unassigned" or not. If it is "Unassigned" I need to cancel the onblur event and keep the focus on to the same combo.
Please refer screen shot 1.
This is the javascript which I has been used to cancel the event.
if (sender.get_text() === "Unassigned") {
eventArgs.get_domEvent().preventDefault();
return false;
}
Problem:When the user tabs out first time of the ComboBox the event gets cancelled and the focus stays on the same combo box (in this case it is the 3rd Combo).But when the user hits the tab button again the focus moves to the next control.When I debugged the code I found that when the user first hits the tab button, following line works
eventArgs.get_domEvent().preventDefault();
I can see the preventDefault function, see following snapshot.
Please refer screen shot 2.
but when the user hits the tab button again I get an error and cannot see preventDefault function, see following snapshot
Please refer screen shot 3.
I am not able to understand what is going wrong here. Anyhelp would be appreciated.
Please refer screen shot 1.
This is the javascript which I has been used to cancel the event.
if (sender.get_text() === "Unassigned") {
eventArgs.get_domEvent().preventDefault();
return false;
}
Problem:When the user tabs out first time of the ComboBox the event gets cancelled and the focus stays on the same combo box (in this case it is the 3rd Combo).But when the user hits the tab button again the focus moves to the next control.When I debugged the code I found that when the user first hits the tab button, following line works
eventArgs.get_domEvent().preventDefault();
I can see the preventDefault function, see following snapshot.
Please refer screen shot 2.
but when the user hits the tab button again I get an error and cannot see preventDefault function, see following snapshot
Please refer screen shot 3.
I am not able to understand what is going wrong here. Anyhelp would be appreciated.