@syncfusion/ej2-inputs 25.1.42 → 25.2.5

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.
@@ -448,6 +448,9 @@ var Input;
448
448
  if (args.properties.showClearButton) {
449
449
  unWireClearBtnEvents(args.element, button);
450
450
  }
451
+ if (!isNullOrUndefined(args.buttons)) {
452
+ _internalRipple(false, null, args.buttons);
453
+ }
451
454
  unwireFloatingEvents(args.element);
452
455
  if (!isNullOrUndefined(args.element)) {
453
456
  delete args.element.__eventHandlers;
@@ -554,6 +557,9 @@ var Input;
554
557
  * @param {HTMLElement} container - The parent element which is need to get the label span to calculate width
555
558
  */
556
559
  function calculateWidth(element, container, moduleName) {
560
+ if (moduleName !== 'multiselect' && !_isElementVisible(element)) {
561
+ return;
562
+ }
557
563
  const elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'), 10);
558
564
  if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
559
565
  if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
@@ -876,8 +882,8 @@ var Input;
876
882
  }
877
883
  else if (buttons.length > 0) {
878
884
  for (let index = 0; index < buttons.length; index++) {
879
- buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple, this);
880
- buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple, this);
885
+ buttons[parseInt(index.toString())].removeEventListener('mousedown', _onMouseDownRipple);
886
+ buttons[parseInt(index.toString())].removeEventListener('mouseup', _onMouseUpRipple);
881
887
  }
882
888
  }
883
889
  }
@@ -886,6 +892,22 @@ var Input;
886
892
  button.classList.add('e-input-btn-ripple');
887
893
  }
888
894
  }
895
+ function _isElementVisible(element) {
896
+ if (!element) {
897
+ return false;
898
+ }
899
+ // Check if the element or any of its parents are hidden using display: none
900
+ let currentElement = element;
901
+ while (currentElement && currentElement !== document.body) {
902
+ const style = window.getComputedStyle(currentElement);
903
+ if (style.display === 'none') {
904
+ return false;
905
+ }
906
+ currentElement = currentElement.parentElement;
907
+ }
908
+ // If none of the elements have display: none, the element is considered visible
909
+ return true;
910
+ }
889
911
  function _onMouseDownRipple() {
890
912
  // eslint-disable-next-line @typescript-eslint/no-this-alias
891
913
  const ele = this;