diff --git a/web/src/lightbox.ts b/web/src/lightbox.ts index 05309bf1a6..745a659e0f 100644 --- a/web/src/lightbox.ts +++ b/web/src/lightbox.ts @@ -258,7 +258,7 @@ function display_image(payload: Payload): void { $(".media-description .title") .text(payload.title ?? "N/A") .attr("aria-label", payload.title ?? "N/A") - .prop("data-filename", filename ?? "N/A"); + .attr("data-filename", filename ?? "N/A"); if (payload.user !== undefined) { $(".media-description .user").text(payload.user).prop("title", payload.user); } @@ -303,7 +303,7 @@ function display_video(payload: Payload): void { $(".media-description .title") .text(payload.title ?? "N/A") .attr("aria-label", payload.title ?? "N/A") - .prop("data-filename", filename ?? "N/A"); + .attr("data-filename", filename ?? "N/A"); if (payload.user !== undefined) { $(".media-description .user").text(payload.user).prop("title", payload.user); } diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.ts index 68f70e22f5..79bb206413 100644 --- a/web/src/tippyjs.ts +++ b/web/src/tippyjs.ts @@ -278,7 +278,7 @@ export function initialize(): void { if (title === undefined) { return false; } - const filename = $(instance.reference).prop("data-filename"); + const filename = $(instance.reference).attr("data-filename"); const $markup = $("").text(title); if (title !== filename) { // If the image title is the same as the filename, there's no reason