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

kendo core scoped jQuery bugs

5 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 07 May 2013, 02:13 PM
I'm not sure where to post bug information. Please let me know if it should go somewhere other than here.

In 2013 Q1's builds (and at least the current latest internal build as well as the previous) kendo core references the wrong jQuery instance. Using the latest internal build as reference (build 506):

  • Line 2790 uses jQuery.each instead of $.each
  • Line 2794 uses jQuery.event.special instead of $.event.special
  • Line 2806 uses !jQuery.contains instead of !$.contains
I'm sure these go unnoticed to most users but I wrap my kendo scripts to be loaded with RequireJS and it's important that the correct reference provided by the closure is used.

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 May 2013, 03:05 PM
Hello Ryan,

Actually we have deliberately used "jQuery" instead of "$" in this case.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ryan
Top achievements
Rank 1
answered on 07 May 2013, 04:34 PM
Hi Dimo,

My mistake. Could you explain why?
0
Petyo
Telerik team
answered on 09 May 2013, 02:52 PM
Hello Ryan,

The reason for this is because we need to export the special MSPointer events in the original (not the subclassed) jQuery objects - otherwise clients who pass vanilla jQuery objects (which is recommended) as configuration to our widgets may experience issues in IE10 as the passed objects will not trigger those events as our framework expects.

All the best,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ryan
Top achievements
Rank 1
answered on 09 May 2013, 05:36 PM
Hi Peyto,

Thank you for the response! I'd really like to understand this completely but I don't yet. 

"The reason for this is because we need to export the special MSPointer events in the original (not the subclassed) jQuery objects"

Isn't the subclassed jQuery object just kendoJQuery? As far as I see, the jQuery at the end of the IIFE isn't touched and should be equal to the first function param, $, at all times.

" - otherwise clients who pass vanilla jQuery objects (which is recommended) as configuration to our widgets may experience issues in IE10 as the passed objects will not trigger those events as our framework expects."

Could you rephrase this part for me? In my application, jQuery is not globally scoped. I call noConflict and use the vanilla jQuery instance for kendo.core. I take the export from kendo.core and feed it to the other widgets that depend on it ($ = kendo.jQuery, kendo = kendo.core). I'm not seeing how within the scope of kendo.core the reference to a global jQuery is/should be different than the $ provided by the IIFE.
0
Petyo
Telerik team
answered on 13 May 2013, 06:57 AM
Hi Ryan,

I am sorry, it took me a while to realize your idea (and I completely forgot that kendo.core actually receives the vanilla jQuery as a parameter of the closure). You are correct - we can safely apply that change in kendo.core. We have scheduled it for our upcoming service pack. I am updating your telerik points for this finding.

Greetings,
Petyo
the Telerik team
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
Ryan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Ryan
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or