@descope/web-components-ui 1.0.340 → 1.0.341
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +20 -12
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-password/PasswordClass.js +18 -10
package/dist/cjs/index.cjs.js
CHANGED
@@ -3541,18 +3541,26 @@ const componentName$O = getComponentName('password');
|
|
3541
3541
|
|
3542
3542
|
const customMixin$9 = (superclass) =>
|
3543
3543
|
class PasswordFieldMixinClass extends superclass {
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3547
|
-
|
3548
|
-
|
3549
|
-
|
3550
|
-
|
3551
|
-
|
3552
|
-
|
3553
|
-
|
3554
|
-
|
3555
|
-
this.
|
3544
|
+
init() {
|
3545
|
+
super.init?.();
|
3546
|
+
|
3547
|
+
this.handleCaretOnVisibilityChange();
|
3548
|
+
}
|
3549
|
+
|
3550
|
+
get caretPosition() {
|
3551
|
+
return this.value?.length || 0;
|
3552
|
+
}
|
3553
|
+
|
3554
|
+
handleCaretOnVisibilityChange() {
|
3555
|
+
const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(
|
3556
|
+
this.baseElement
|
3557
|
+
);
|
3558
|
+
this.baseElement._togglePasswordVisibility = () => {
|
3559
|
+
setTimeout(() => {
|
3560
|
+
origTogglePasswordVisibility();
|
3561
|
+
this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);
|
3562
|
+
});
|
3563
|
+
};
|
3556
3564
|
}
|
3557
3565
|
|
3558
3566
|
getAutocompleteType() {
|