Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/src/image-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ function initializeImageDialogs() {
].join(', ');

document.querySelectorAll(magnifiableImageSelector).forEach((image) => {
if (initializedImageDialogs.has(image)) {
// Do not initialize the same image twice, and do not initialize
// anything that explicitly opts out.
if (initializedImageDialogs.has(image) || image.closest('[data-ptx-image-dialog="false"]')) {
return;
}

Expand Down