Fix a bug: wait for promise before displaying message for clipboard pasted password

This commit is contained in:
2020-09-21 18:05:00 +02:00
parent 4cfd61d077
commit 12d49fab4e
2 changed files with 22 additions and 8 deletions

View File

@@ -69,14 +69,18 @@ function _query_tabs_get_password(tabs)
function(arg)
{
debug("Response to setPassword " + arg);
if (arg == "" || force_copy)
if (arg === "" || force_copy)
{
navigator.clipboard.writeText(response.password);
notify("Password pasted into clipboard", "");
navigator.clipboard.writeText(response.password).then(function() {
notify("Password pasted into clipboard", "");
window.close();
});
}
else
{
notify("Password filled", "");
window.close();
window.close();
}
}
);
}