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 (#13127)
  • Loading branch information
ottenhoff authored Dec 23, 2024
1 parent 5f9afab commit daf8814
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 daf8814

Please sign in to comment.