diff --git a/manifest.json b/manifest.json index 63cbbfd..279ce20 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Unique Passwords", "short_name": "unique-passwords", - "version": "1.2.0", + "version": "1.2.1", "description": "Generate strong and unique site-specific passwords!", "homepage_url": "https://github.com/wolandmaster/unique-passwords-firefox", "icons": { diff --git a/scripts/content.js b/scripts/content.js index 7514aea..4791d79 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -22,8 +22,10 @@ port.postMessage({ action: "setUsername", username }); } else if (msg.action === "setUsername" && usernameInput) { usernameInput.value = msg.username; + usernameInput.dispatchEvent(new Event("input", { bubbles: true })); } else if (msg.action === "setPassword") { passwordInput.value = msg.password; + passwordInput.dispatchEvent(new Event("input", { bubbles: true })); } else if (msg.action === "showPassword") { passwordInput.type = msg.visible ? "text" : "password"; } diff --git a/scripts/popup.js b/scripts/popup.js index ab222ab..8f07e20 100644 --- a/scripts/popup.js +++ b/scripts/popup.js @@ -38,7 +38,7 @@ domain.addEventListener("input", setGenerateEnable); // Username - port.onMessage.addListener(msg => (msg.action === "setUsername") && (username.value = msg.username)); + port.onMessage.addListener(msg => (msg.action === "setUsername") && (msg.username) && (username.value = msg.username)); port.postMessage({ action: "getUsername", passwordInputId }); // Master Password