@syncfusion/ej2-inputs 25.2.3 → 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.
@@ -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;