From ecc4e204bd422ab749afed07302265288ce9d921 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Tue, 25 Mar 2025 14:01:56 +0100
Subject: [PATCH] fix: update password value to input event #302

---
 source/components/form/login.mjs    |  2 +-
 source/components/form/password.mjs | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/source/components/form/login.mjs b/source/components/form/login.mjs
index 202ce593..8e0105f0 100644
--- a/source/components/form/login.mjs
+++ b/source/components/form/login.mjs
@@ -487,7 +487,7 @@ function getTranslations() {
 
 		case "hi":
 			return {
-				username: "उपयो\A4\97कर नम य ई-मल",
+				username: "उपयगकर नम य ई-मल",
 				password: "पसवर",
 				login: "लग इन कर",
 				forgotPasswordLink: "पसवर भल गए?",
diff --git a/source/components/form/password.mjs b/source/components/form/password.mjs
index 2735828d..803f8800 100644
--- a/source/components/form/password.mjs
+++ b/source/components/form/password.mjs
@@ -20,10 +20,6 @@ import {
 import { PasswordStyleSheet } from "./stylesheet/password.mjs";
 import { fireCustomEvent } from "../../dom/events.mjs";
 import "./input-group.mjs";
-import { addErrorAttribute } from "../../dom/error.mjs";
-import { STATE_OFF, STATE_ON } from "./toggle-switch.mjs";
-import { Observer } from "../../types/observer.mjs";
-import { internalSymbol } from "../../constants.mjs";
 
 export { Password };
 
@@ -90,7 +86,7 @@ class Password extends CustomControl {
 	 * @return {string}
 	 */
 	get value() {
-		return this[inputElementSymbol].value;
+		return this.getOption("value");
 	}
 
 	/**
@@ -204,6 +200,11 @@ function initEventHandler() {
 		});
 	});
 
+	this[inputElementSymbol].addEventListener("input", function (event) {
+		self.setFormValue(self.value);
+		self.setOption("value", this.value);
+	})
+
 	return this;
 }
 
-- 
GitLab