@syncfusion/ej2-calendars 27.1.52 → 27.1.57

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.
@@ -15007,18 +15007,41 @@ class MaskedDateTime {
15007
15007
  break;
15008
15008
  }
15009
15009
  }
15010
+ let scrollPositionY;
15011
+ if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
15012
+ const scrollableParent = this.findScrollableParent(this.parent.inputElement);
15013
+ scrollPositionY = scrollableParent ? scrollableParent.getBoundingClientRect().top : window.scrollY;
15014
+ }
15010
15015
  this.parent.inputElement.selectionStart = start;
15011
15016
  this.validCharacterCheck();
15012
15017
  if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
15013
15018
  const isbackward = this.isNavigate ? false : true;
15014
15019
  this.isNavigate = this.isDeletion = false;
15015
15020
  this.navigateSelection(isbackward);
15021
+ if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
15022
+ setTimeout(() => {
15023
+ window.scrollTo(0, scrollPositionY);
15024
+ }, 0);
15025
+ }
15016
15026
  }
15017
15027
  if (this.isDeleteKey) {
15018
15028
  this.isDeletion = false;
15019
15029
  }
15020
15030
  this.isDeleteKey = false;
15021
15031
  }
15032
+ findScrollableParent(element) {
15033
+ while (element) {
15034
+ if (this.isScrollable(element)) {
15035
+ return element;
15036
+ }
15037
+ element = element.parentElement;
15038
+ }
15039
+ return null;
15040
+ }
15041
+ isScrollable(element) {
15042
+ const overflowY = window.getComputedStyle(element).overflowY;
15043
+ return element.scrollHeight > element.clientHeight && (overflowY === 'auto' || overflowY === 'scroll');
15044
+ }
15022
15045
  navigateSelection(isbackward) {
15023
15046
  const start = this.parent.inputElement.selectionStart;
15024
15047
  const end = this.parent.inputElement.selectionEnd;