Skip to content

Commit 5839017

Browse files
committed
Fix for internal issue #234087. Remove configuration attributes from the element
1 parent 77c7375 commit 5839017

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/igniteui-angular.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,10 +724,6 @@
724724
if (context) {
725725
var options = scope.$eval(attrs[ controlName ]) ||
726726
extractOptions(controlName, context, {}, element, scope);
727-
/* removing the width and height attributes on the placeholder, because they affect the control dimensions */
728-
if (element.removeAttr) {
729-
element.removeAttr("width").removeAttr("height");
730-
}
731727

732728
if (attrs.source) {
733729
options.dataSource = scope.$eval(attrs.source);
@@ -753,7 +749,22 @@
753749
}
754750
});
755751

752+
/* removing the width and height attributes on the placeholder, because they affect the control dimensions
753+
remove other attributes too, they may confront with some html5 attributes for example draggable
754+
D.K. fix for bug #234087
755+
*/
756+
for (var a in attrs) {
757+
if (a !== "id" &&
758+
!a.startsWith("$") &&
759+
!a.startsWith("data-") &&
760+
!a.startsWith("ng-") &&
761+
element.removeAttr) {
762+
element.removeAttr(a);
763+
}
764+
}
765+
756766
element[ controlName ](options);
767+
757768
}
758769
}
759770
};

0 commit comments

Comments
 (0)