@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.
@@ -4210,8 +4210,8 @@ class Browser {
4210
4210
  * @returns {Object} ?
4211
4211
  */
4212
4212
  static getValue(key, regX) {
4213
- const browserDetails = window.browserDetails;
4214
- if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4213
+ const browserDetails = typeof window !== 'undefined' ? window.browserDetails : {};
4214
+ if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4215
4215
  browserDetails['isIos'] = true;
4216
4216
  browserDetails['isDevice'] = true;
4217
4217
  browserDetails['isTouch'] = true;
@@ -7028,7 +7028,7 @@ let Component = class Component extends Base {
7028
7028
  // tslint:disable-next-line:no-function-constructor-with-string-args
7029
7029
  onIntlChange.on('notifyExternalChange', this.detectFunction, this, this.randomId);
7030
7030
  // Based on the considered control list we have count the instance
7031
- if (!validateLicense()) {
7031
+ if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
7032
7032
  if (componentList.indexOf(this.getModuleName()) !== -1) {
7033
7033
  instancecount = instancecount + 1;
7034
7034
  if (instancecount > 5) {
@@ -8163,6 +8163,12 @@ let Draggable = Draggable_1 = class Draggable extends Base {
8163
8163
  pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
8164
8164
  pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
8165
8165
  }
8166
+ if (this.element && this.element.classList.length > 0 && this.element.classList.value.indexOf("e-dialog") === -1 && document.scrollingElement) {
8167
+ let isVerticalScroll = document.scrollingElement.scrollHeight > 0 && document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight && document.scrollingElement.scrollTop > 0;
8168
+ let isHorrizontalScroll = document.scrollingElement.scrollWidth > 0 && document.scrollingElement.scrollWidth > document.scrollingElement.clientWidth && document.scrollingElement.scrollLeft > 0;
8169
+ pageX = isHorrizontalScroll ? pageX - document.scrollingElement.scrollLeft : pageX;
8170
+ pageY = isVerticalScroll ? pageY - document.scrollingElement.scrollTop : pageY;
8171
+ }
8166
8172
  return {
8167
8173
  left: pageX - (this.margin.left + this.cursorAt.left),
8168
8174
  top: pageY - (this.margin.top + this.cursorAt.top)