Skip to content

Commit 5ac6425

Browse files
committed
fix(*): resolving csp violation in core package
1 parent 8df8172 commit 5ac6425

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/css/structure/modules/infragistics.ui.shared.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,4 +471,13 @@ visibility:hidden;
471471
.ui-hidden-phone {
472472
display: none !important
473473
}
474+
}
475+
/* Scroll measurement helper - used by $.ig.util.getScrollWidth/getScrollHeight */
476+
.ui-ig-scroll-measure {
477+
width: 100px;
478+
height: 100px;
479+
position: absolute;
480+
top: -10000px;
481+
left: -10000px;
482+
overflow: scroll;
474483
}

src/js/modules/infragistics.util.jquery.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,8 +1112,7 @@
11121112

11131113
// Returns the width of the vertical scrollbar
11141114
$.ig.util.getScrollWidth = function () {
1115-
var el = $('<div style="width: 100px; height: 100px; position: absolute; ' +
1116-
'top: -10000px; left: -10000px; overflow: scroll"></div>')
1115+
var el = $('<div></div>').addClass('ui-ig-scroll-measure')
11171116
.appendTo($(document.body)), scrollWidth;
11181117
scrollWidth = el[ 0 ].offsetWidth - el[ 0 ].clientWidth;
11191118
el.remove();
@@ -1122,8 +1121,7 @@
11221121

11231122
// Returns the height of the horizontal scrollbar
11241123
$.ig.util.getScrollHeight = function () {
1125-
var el = $('<div style="width: 100px; height: 100px; position: absolute; ' +
1126-
'top: -10000px; left: -10000px; overflow: scroll"></div>')
1124+
var el = $('<div></div>').addClass('ui-ig-scroll-measure')
11271125
.appendTo($(document.body)), scrollHeight;
11281126
scrollHeight = el[ 0 ].offsetHeight - el[ 0 ].clientHeight;
11291127
el.remove();

0 commit comments

Comments
 (0)