@syncfusion/ej2-calendars 27.1.52 → 27.1.55

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.
@@ -15156,18 +15156,41 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
15156
15156
  break;
15157
15157
  }
15158
15158
  }
15159
+ var scrollPositionY;
15160
+ if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
15161
+ var scrollableParent = this.findScrollableParent(this.parent.inputElement);
15162
+ scrollPositionY = scrollableParent ? scrollableParent.getBoundingClientRect().top : window.scrollY;
15163
+ }
15159
15164
  this.parent.inputElement.selectionStart = start;
15160
15165
  this.validCharacterCheck();
15161
15166
  if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
15162
15167
  var isbackward = this.isNavigate ? false : true;
15163
15168
  this.isNavigate = this.isDeletion = false;
15164
15169
  this.navigateSelection(isbackward);
15170
+ if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
15171
+ setTimeout(function () {
15172
+ window.scrollTo(0, scrollPositionY);
15173
+ }, 0);
15174
+ }
15165
15175
  }
15166
15176
  if (this.isDeleteKey) {
15167
15177
  this.isDeletion = false;
15168
15178
  }
15169
15179
  this.isDeleteKey = false;
15170
15180
  };
15181
+ MaskedDateTime.prototype.findScrollableParent = function (element) {
15182
+ while (element) {
15183
+ if (this.isScrollable(element)) {
15184
+ return element;
15185
+ }
15186
+ element = element.parentElement;
15187
+ }
15188
+ return null;
15189
+ };
15190
+ MaskedDateTime.prototype.isScrollable = function (element) {
15191
+ var overflowY = window.getComputedStyle(element).overflowY;
15192
+ return element.scrollHeight > element.clientHeight && (overflowY === 'auto' || overflowY === 'scroll');
15193
+ };
15171
15194
  MaskedDateTime.prototype.navigateSelection = function (isbackward) {
15172
15195
  var start = this.parent.inputElement.selectionStart;
15173
15196
  var end = this.parent.inputElement.selectionEnd;