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

Validation exception.

3 Answers 16 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jose Mejia
Top achievements
Rank 1
Jose Mejia asked on 21 Feb 2014, 05:09 PM
Hi.

Suppose I have something like this: http://jsfiddle.net/3mJJm/27/.

Select draw a rectangle on a map, select some area and click validate.
There will be exception: Uncaught TypeError: Object #<SVGAnimatedString> has no method 'indexOf'

For now the only possible workaround I found is added guard condition for SVGAnimatedString:
_findMessageContainer: function(fieldName) {
            var locators = kendo.ui.validator.messageLocators,
                name,
                containers = $(),
                children = this.element[0].getElementsByTagName("*");
 
            for (var idx = 0, length = children.length; idx < length; idx++) {
                var element = children[idx];
                 
                                              //added code
                if(element.className instanceof SVGAnimatedString) continue;
                 
                if (element.className.indexOf(INVALIDMSG) > -1) {
                    var attr = element.getAttribute(kendo.attr("for"));
                    if (attr === fieldName) {
                        containers = containers.add(element);
                    }
                }
            }


Is there more robust workaround?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Jose Mejia
Top achievements
Rank 1
answered on 21 Feb 2014, 05:36 PM
0
Jose Mejia
Top achievements
Rank 1
answered on 21 Feb 2014, 05:37 PM
fixed url - here.
0
Rosen
Telerik team
answered on 24 Feb 2014, 11:55 AM
Hello Jose,

This issue is a known one and has been already addressed. Thus, upgrading to a more recent version of Kendo UI should resolve it.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Jose Mejia
Top achievements
Rank 1
Answers by
Jose Mejia
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or