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

[Solved] Disable/Enable Q2 2011 Beta Bug

2 Answers 41 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 29 Jun 2011, 04:10 PM
Hello,

We are working with the latest Q2 2011 Beta MVC Extensions and we may have identified a bug.  We have a DropDownList control being utilized and based on a specific condition we disable/enable the control as follows:

if (dataItem.FooID > 0){
    $('#FooID').data("tDropDownList").disable();            
} else {
    $('#FooID').data("tDropDownList").enable(); 
}

In some scenarios, the $('#FooID') control may already be enabled.  In Q1 2011 it handled the case where the control is already enabled and we try to enable it again.  Now, in the Q2 2011 Beta this scenario blocks the drop down from actually dropping down.  You can down arrow through the data items (with the keyboard) but you do not get the animation of the drop down.  If we comment out the .enable(); line all is well for that scenario but in the scenario where we DO want to enable it no longer works (For obvious reasons).

Is this a known issue?  If so is there a hotfix?

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 30 Jun 2011, 09:49 AM
Hello Ryan,

 
We was able to observe the depicted issue. I am glad to inform you that was able to address the problem and the fix will be included in the next official release of Telerik Extensions for ASP.NET MVC.

Here are the fixes:

#1: telerik.list.js

this.enable = function () {
            var wrapper = this.$wrapper.removeClass('t-state-disabled');
 
            if (!wrapper.data("events")) {
                this.$wrapper
                    .removeClass('t-state-disabled')
                    .bind({
                        keydown: $.proxy(keydown, this),
                        keypress: $.proxy(keypress, this),
                        click: $.proxy(function (e) {
                            var trigger = this.trigger;
                            var dropDown = this.dropDown;
 
                            this.$wrapper.focus();
 
                            if (dropDown.isOpened())
                                trigger.close();
                            else if (!dropDown.$items)
                                this.fill(trigger.open);
                            else
                                trigger.open();
                        }, this)
                    });
            }
 
            $element.removeAttr("disabled");
        }

#2: telerik.combobox.js
this.enable = function () {
            $wrapper.removeClass('t-state-disabled');
            $text.removeAttr("disabled");
            $element.removeAttr("disabled");
            if (!$selectIcon.data("events")) {
                $selectIcon.bind('click', $.proxy(togglePopup, this));
            }
        }

I have updated your Telerik points.
Regards,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ryan
Top achievements
Rank 1
answered on 30 Jun 2011, 06:17 PM
Thank you very much!  Appreciate the response and the fix.
Tags
ComboBox
Asked by
Ryan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or