Skip to content

Commit

Permalink
Shareable Sources: Close on Escape
Browse files Browse the repository at this point in the history
  • Loading branch information
shogenapps committed Jun 7, 2024
1 parent 60a2d17 commit 060ff40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/features/shareable_sources/shareable_sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ function getSources(person, active = 0) {
}, 1000);
}

// Close reference box on Escape key
$(document).on("keydown", function (e) {
if (e.key === "Escape") {
referenceBox.fadeOut();
}
});

if (activeSources == 1 && !isProfileAddRelative) {
$("div.referenceBox div").slideDown("swing");
}
Expand Down

0 comments on commit 060ff40

Please sign in to comment.