Skip to content

Commit

Permalink
on inject, only focus injected content
Browse files Browse the repository at this point in the history
  • Loading branch information
pilz committed Dec 2, 2019
1 parent a682dcb commit e55ed34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pat/autofocus/autofocus.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ define([
init: function init($el) {

this.setFocus(this.trigger);
$(document).on("pat-update", function (e, data) {
autofocus.setFocus(e.target);
});
$(document).on("patterns-injected", function (e, data) {
autofocus.setFocus($(e.target).find(autofocus.trigger));
});
},
setFocus: function (target) {
var $all = $(target);
Expand Down

0 comments on commit e55ed34

Please sign in to comment.