Fix a bug: wait for promise before displaying message for clipboard pasted password
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user