@syncfusion/ej2-inputs 22.2.9 → 22.2.12

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.
@@ -107,11 +107,23 @@ var Input;
107
107
  Input.bindInitialEvent = bindInitialEvent;
108
108
  function checkInputValue(floatLabelType, inputElement) {
109
109
  const inputValue = inputElement.value;
110
- if (inputValue !== '' && !isNullOrUndefined(inputValue) && inputElement.parentElement) {
111
- inputElement.parentElement.classList.add('e-valid-input');
110
+ const inputParent = inputElement.parentElement;
111
+ const grandParent = inputParent.parentElement;
112
+ if (inputValue !== '' && !isNullOrUndefined(inputValue)) {
113
+ if (inputParent && inputParent.classList.contains('e-input-group')) {
114
+ inputParent.classList.add('e-valid-input');
115
+ }
116
+ else if (grandParent && grandParent.classList.contains('e-input-group')) {
117
+ grandParent.classList.add('e-valid-input');
118
+ }
112
119
  }
113
- else if (floatLabelType !== 'Always' && inputElement.parentElement) {
114
- inputElement.parentElement.classList.remove('e-valid-input');
120
+ else if (floatLabelType !== 'Always') {
121
+ if (inputParent && inputParent.classList.contains('e-input-group')) {
122
+ inputParent.classList.remove('e-valid-input');
123
+ }
124
+ else if (grandParent && grandParent.classList.contains('e-input-group')) {
125
+ grandParent.classList.remove('e-valid-input');
126
+ }
115
127
  }
116
128
  }
117
129
  function _focusFn() {
@@ -839,7 +851,11 @@ var Input;
839
851
  const result = container.querySelectorAll(inputElement.tagName + ' ~ *');
840
852
  innerWrapper.appendChild(inputElement);
841
853
  for (let i = 0; i < result.length; i++) {
842
- innerWrapper.appendChild(result[parseInt(i.toString())]);
854
+ const element = result[parseInt(i.toString())];
855
+ const parentElement = innerWrapper.parentElement;
856
+ if (!(element.classList.contains('e-float-line')) || (!(parentElement && parentElement.classList.contains('e-filled')) && parentElement)) {
857
+ innerWrapper.appendChild(element);
858
+ }
843
859
  }
844
860
  }
845
861
  innerWrapper.parentNode.insertBefore(button, innerWrapper);