I am using kendo UI with AngularJS, and have ran into this issue in Firefox.
Version Information
===============
Kendo UI Version : v2014.2.1008
Issue reproducible ONLY in Firefox (v33.0.2), works fine in Chrome.
Exception stack trace :
=======================
createWidget@http://localhost/Scripts/lib/kendo.all.js:83279:13\n\n
createIt@http://localhost/Scripts/lib/kendo.all.js:83407:38\n\n
timeout/timeoutId<@http://localhost/Scripts/lib/angular/angular.js:14304:28\n\n
completeOutstandingRequest@http://localhost/Scripts/lib/angular/angular.js:4397:7\n\n
Browser/self.defer/timeoutId<@http://localhost/Scripts/lib/angular/angular.js:4705:7"
On debugging further, I figured that the issue is with 'element' argument passed to link function of 'directiveFactory' angular directive.
module.factory('directiveFactory', ['$timeout', '$parse', '$compile', '$log', function(timeout, parse, compile, log) {
...
...
...
link: function(scope, element, attrs, controllers) {
While 'element' is interpreted as a jQuery wrapped obj in Chrome, it's just an Object inside Firefox. Hence, inside createWidget(), the following check fails inside Firefox :
if (element.is("select")) {
As an immediate fix, I have modified createWidget() call inside createIt()
from
var widget = createWidget(scope, element, attrs, role, origAttr);
to
var widget = createWidget(scope, ((element instanceof jQuery) ? element : $(element)), attrs, role, origAttr);
This resolves the issue.
Question
=========
Can you investigate this issue and suggest a permanent fix / workaround for this issue ?
Version Information
===============
Kendo UI Version : v2014.2.1008
Issue reproducible ONLY in Firefox (v33.0.2), works fine in Chrome.
Exception stack trace :
=======================
createWidget@http://localhost/Scripts/lib/kendo.all.js:83279:13\n\n
createIt@http://localhost/Scripts/lib/kendo.all.js:83407:38\n\n
timeout/timeoutId<@http://localhost/Scripts/lib/angular/angular.js:14304:28\n\n
completeOutstandingRequest@http://localhost/Scripts/lib/angular/angular.js:4397:7\n\n
Browser/self.defer/timeoutId<@http://localhost/Scripts/lib/angular/angular.js:4705:7"
On debugging further, I figured that the issue is with 'element' argument passed to link function of 'directiveFactory' angular directive.
module.factory('directiveFactory', ['$timeout', '$parse', '$compile', '$log', function(timeout, parse, compile, log) {
...
...
...
link: function(scope, element, attrs, controllers) {
While 'element' is interpreted as a jQuery wrapped obj in Chrome, it's just an Object inside Firefox. Hence, inside createWidget(), the following check fails inside Firefox :
if (element.is("select")) {
As an immediate fix, I have modified createWidget() call inside createIt()
from
var widget = createWidget(scope, element, attrs, role, origAttr);
to
var widget = createWidget(scope, ((element instanceof jQuery) ? element : $(element)), attrs, role, origAttr);
This resolves the issue.
Question
=========
Can you investigate this issue and suggest a permanent fix / workaround for this issue ?
