Skip to content

Commit

Permalink
SAK-50114 Webcomponents dismiss profile photo per Bootstrap recommend…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
ottenhoff committed Dec 20, 2024
1 parent ad06519 commit 5337e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions roster2/tool/src/webapp/js/roster.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,10 +832,6 @@ roster.init = function () {
error: () => console.error("failure retrieving search index data")
});

document.addEventListener("profile-shown", () => {
document.querySelectorAll("sakai-user-photo").forEach(sup => sup.close());
});

roster.switchState(roster.state, roster);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class SakaiUserPhoto extends SakaiElement {
new bootstrap.Popover(el, {
content: sakaiProfile,
html: true,
trigger: "focus",
});
el.addEventListener("show.bs.popover", () => {

Expand All @@ -95,8 +96,11 @@ export class SakaiUserPhoto extends SakaiElement {
<div data-user-id="${this.userId}"
class="sakai-user-photo ${this.classes}"
data-bs-toggle="popover"
data-bs-trigger="focus"
aria-label="${ifDefined(this.label)}"
title="${ifDefined(this.label)}"
tabindex="0"
role="button"
style="background-image:url(${this.url}) ${this.profilePopup === SakaiUserPhoto.OFF ? "" : ";cursor: pointer;"}">
${this.online ? html`
<span></span>
Expand Down

0 comments on commit 5337e2a

Please sign in to comment.