Tabbing not working

3 posts, 1 answers
  1. Himanshu
    Himanshu avatar
    22 posts
    Member since:
    Jun 2013

    Posted 10 Mar 2014 Link to this post

    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") {
    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

    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.

  2. Answer
    Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 13 Mar 2014 Link to this post

    Hi Himanshu,

    On OnClientBlur event is fired after the focus is lost. Why don't you try to return the focus of the combo instead cancel the event:

    function OnClientBlur(sender, args) {
        var text = sender.get_text();
        if (text != "") {
            var input = sender.get_inputDomElement();
            setTimeout(function () {
            }, 100);

    I hope this helps.

    Hristo Valyavicharski

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. Himanshu
    Himanshu avatar
    22 posts
    Member since:
    Jun 2013

    Posted 04 Apr 2014 in reply to Hristo Valyavicharski Link to this post

    Thanks Hristo Valyavicharski.....
Back to Top