From 6137e540810251a04fb0cb7ec35fe0d3d0fcfafd Mon Sep 17 00:00:00 2001 From: kevin-j-morse <4412177+kevin-j-morse@users.noreply.github.com> Date: Mon, 11 Nov 2019 01:33:37 -0800 Subject: [PATCH] Replace deprecated jQuery event shorthand See https://github.com/jquery/jquery-migrate/blob/master/warnings.md --- src/featherlight.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/featherlight.js b/src/featherlight.js index 30722dca..c1cda196 100644 --- a/src/featherlight.js +++ b/src/featherlight.js @@ -526,7 +526,7 @@ $target.data('featherlight-persisted', fl); } if (elemConfig.$currentTarget.blur) { - elemConfig.$currentTarget.blur(); // Otherwise 'enter' key might trigger the dialog again + elemConfig.$currentTarget.trigger('blur'); // Otherwise 'enter' key might trigger the dialog again } fl.open(event); }; @@ -648,7 +648,7 @@ afterContent: function(_super, event){ var r = _super(event); - this.$instance.find('[autofocus]:not([disabled])').focus(); + this.$instance.find('[autofocus]:not([disabled])').trigger('focus'); this.onResize(event); return r; }