@syncfusion/ej2-base 20.4.40 → 20.4.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4262,8 +4262,8 @@ var Browser = /** @__PURE__ @class */ (function () {
4262
4262
  * @returns {Object} ?
4263
4263
  */
4264
4264
  Browser.getValue = function (key, regX) {
4265
- var browserDetails = window.browserDetails;
4266
- if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4265
+ var browserDetails = typeof window !== 'undefined' ? window.browserDetails : {};
4266
+ if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4267
4267
  browserDetails['isIos'] = true;
4268
4268
  browserDetails['isDevice'] = true;
4269
4269
  browserDetails['isTouch'] = true;
@@ -7080,7 +7080,7 @@ var Component = /** @__PURE__ @class */ (function (_super) {
7080
7080
  // tslint:disable-next-line:no-function-constructor-with-string-args
7081
7081
  onIntlChange.on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);
7082
7082
  // Based on the considered control list we have count the instance
7083
- if (!validateLicense()) {
7083
+ if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
7084
7084
  if (componentList.indexOf(_this.getModuleName()) !== -1) {
7085
7085
  instancecount = instancecount + 1;
7086
7086
  if (instancecount > 5) {
@@ -8251,6 +8251,12 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
8251
8251
  pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
8252
8252
  pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
8253
8253
  }
8254
+ if (this.element && this.element.classList.length > 0 && this.element.classList.value.indexOf("e-dialog") === -1 && document.scrollingElement) {
8255
+ var isVerticalScroll = document.scrollingElement.scrollHeight > 0 && document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight && document.scrollingElement.scrollTop > 0;
8256
+ var isHorrizontalScroll = document.scrollingElement.scrollWidth > 0 && document.scrollingElement.scrollWidth > document.scrollingElement.clientWidth && document.scrollingElement.scrollLeft > 0;
8257
+ pageX = isHorrizontalScroll ? pageX - document.scrollingElement.scrollLeft : pageX;
8258
+ pageY = isVerticalScroll ? pageY - document.scrollingElement.scrollTop : pageY;
8259
+ }
8254
8260
  return {
8255
8261
  left: pageX - (this.margin.left + this.cursorAt.left),
8256
8262
  top: pageY - (this.margin.top + this.cursorAt.top)