@descope/web-components-ui 1.0.363 → 1.0.364

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -3071,18 +3071,9 @@ class PasscodeInternal extends BaseInputClass$7 {
3071
3071
  }
3072
3072
 
3073
3073
  initInputs() {
3074
- let currentInput;
3075
-
3076
3074
  this.inputs.forEach((input) => {
3077
3075
  input.shadowRoot.appendChild(createInputMaskStyle());
3078
3076
 
3079
- input.addEventListener('change', (e) => {
3080
- if (currentInput !== e.target) {
3081
- this.parseInputValue(input, input.value);
3082
- this.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
3083
- }
3084
- });
3085
-
3086
3077
  const handleParseInput = (val) => {
3087
3078
  this.parseInputValue(input, val);
3088
3079
  toggleMaskVisibility(input);
@@ -3098,16 +3089,7 @@ class PasscodeInternal extends BaseInputClass$7 {
3098
3089
  toggleMaskVisibility(input, input.value[0]);
3099
3090
  }
3100
3091
 
3101
- // when using iPhone's code autofill we get only `change` events.
3102
- // In other scenarios we get `input` AND `change` events.
3103
- // In order to be parse the digits properly in iPhone, we need to listen to `change` event
3104
- // and validate it was not preceeded by an `input` event.
3105
- // To do so, we're keeping a reference to the input element in `input` events,
3106
- // and only if there the reference is null, then we're assuming no `input` event was preceeding,
3107
- // and we're parsing the digits.
3108
- currentInput = e.target;
3109
3092
  setTimeout(() => {
3110
- currentInput = null;
3111
3093
  if (e?.inputType === 'deleteContentBackward') {
3112
3094
  focusElement(this.getPrevInput(input));
3113
3095
  }