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

[Solved] jQuery 1.6+ attr changes causing ComboBox error

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 01 Jun 2011, 06:59 PM
In jQuery 1.6+ the attr function will return undefined if the attr doesn't exist (1.5.2 and before would return an empty string). Are there any plans to update the Telerik JS to accommodate this?

I've seen at least one error in telerik.combobox.js (line 42) as a result.

This:
var $input = this.$input = this.$element.find('input:last')
    .bind(changePropertyEventName, function (e) {
       var attr = 'class',
           classValue = $input.attr(attr)
 
       if (classValue != $text.attr(attr))
           $text.attr(attr, classValue).addClass('t-input');
    });

Should be updated to this:
var $input = this.$input = this.$element.find('input:last')
    .bind(changePropertyEventName, function (e) {
       var attr = 'class',
           classValue = $input.attr(attr)
 
       if (classValue !== undefined && classValue != $text.attr(attr))
           $text.attr(attr, classValue).addClass('t-input');
    });


Cheers,
Jonathan

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 02 Jun 2011, 10:08 AM
Hello Jonathan,

The reported problem is a known issue, which I am glad to inform you is already addressed. The fix will be included in the next official release of Telerik extensions for ASP.NET MVC.

Best 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
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or