@syncfusion/ej2-inputs 25.2.3 → 25.2.6

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.
@@ -451,6 +451,9 @@ var Input;
451
451
  if (args.properties.showClearButton) {
452
452
  unWireClearBtnEvents(args.element, button);
453
453
  }
454
+ if (!isNullOrUndefined(args.buttons)) {
455
+ _internalRipple(false, null, args.buttons);
456
+ }
454
457
  unwireFloatingEvents(args.element);
455
458
  if (!isNullOrUndefined(args.element)) {
456
459
  delete args.element.__eventHandlers;
@@ -557,6 +560,9 @@ var Input;
557
560
  * @param {HTMLElement} container - The parent element which is need to get the label span to calculate width
558
561
  */
559
562
  function calculateWidth(element, container, moduleName) {
563
+ if (moduleName !== 'multiselect' && !_isElementVisible(element)) {
564
+ return;
565
+ }
560
566
  var elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'), 10);
561
567
  if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
562
568
  if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
@@ -881,8 +887,8 @@ var Input;
881
887
  }
882
888
  else if (buttons.length > 0) {
883
889
  for (var index = 0; index < buttons.length; index++) {
884
- buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple, this);
885
- buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple, this);
890
+ buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple);
891
+ buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple);
886
892
  }
887
893
  }
888
894
  }
@@ -891,6 +897,22 @@ var Input;
891
897
  button.classList.add('e-input-btn-ripple');
892
898
  }
893
899
  }
900
+ function _isElementVisible(element) {
901
+ if (!element) {
902
+ return false;
903
+ }
904
+ // Check if the element or any of its parents are hidden using display: none
905
+ var currentElement = element;
906
+ while (currentElement && currentElement !== document.body) {
907
+ var style = window.getComputedStyle(currentElement);
908
+ if (style.display === 'none') {
909
+ return false;
910
+ }
911
+ currentElement = currentElement.parentElement;
912
+ }
913
+ // If none of the elements have display: none, the element is considered visible
914
+ return true;
915
+ }
894
916
  function _onMouseDownRipple() {
895
917
  // eslint-disable-next-line @typescript-eslint/no-this-alias
896
918
  var ele = this;
@@ -13667,6 +13689,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13667
13689
  _this.isForm = false;
13668
13690
  _this.inputPreviousValue = null;
13669
13691
  _this.isVue = false;
13692
+ _this.isReact = false;
13670
13693
  _this.textboxOptions = options;
13671
13694
  return _this;
13672
13695
  }
@@ -13813,7 +13836,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13813
13836
  if (this.element.tagName !== 'TEXTAREA') {
13814
13837
  this.element.setAttribute('type', this.type);
13815
13838
  }
13816
- if (this.type === 'text') {
13839
+ if (this.type === 'text' || (this.element.tagName === 'INPUT' && this.multiline && this.isReact)) {
13817
13840
  this.element.setAttribute('role', 'textbox');
13818
13841
  }
13819
13842
  this.globalize = new Internationalization(this.locale);