Skip to content

Commit

Permalink
Trigger change event on Jquery sites
Browse files Browse the repository at this point in the history
More sites are apparently implementing this listener approach

(Issue #19)
  • Loading branch information
ttyridal committed Feb 26, 2016
1 parent a4cac0b commit 22c836b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ext/data/password-fill-cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ self.port.once("the_password", function (d) {
document.activeElement.type === "password")
{
document.activeElement.value = d;
var el;

if ('angular' in unsafeWindow) {
var el = unsafeWindow.angular.element(document.activeElement);
if ('angular' in unsafeWindow)
el = unsafeWindow.angular.element(document.activeElement);
else if ('$' in unsafeWindow)
el = unsafeWindow.$(document.activeElement);
if (el)
el.change();
}
}
});

0 comments on commit 22c836b

Please sign in to comment.