Skip to content

Commit

Permalink
Send real event instead of calling el.change()
Browse files Browse the repository at this point in the history
  • Loading branch information
ttyridal committed Aug 8, 2016
1 parent eeda0be commit 53f671b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ext/data/password-fill-cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ self.port.once("the_password", function (d) {
document.activeElement.type === "password")
{
document.activeElement.value = d;
var el;

if ('angular' in unsafeWindow)
el = unsafeWindow.angular.element(document.activeElement);
else if ('$' in unsafeWindow)
el = unsafeWindow.$(document.activeElement);
if (el)
el.change();
document.activeElement.dispatchEvent(
new Event('change', {bubbles: true, cancelable: true}));
}
});

0 comments on commit 53f671b

Please sign in to comment.