You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PhotoSwipe inside a shadow root, zoom functionality fails when clicking on an image, and closing the gallery fails when clicking on the background. This issue arises because the event is attached to the window using "events.add(window)". Consequently, the event's target becomes the host element of the shadow root, rather than the element clicked by the user. This leads to the problem because PhotoSwipe relies on the presence of classes like 'pswp__img', 'pswp__item', 'pswp__zoom-wrap' when processing a click, which the host element lacks. The solution lies in attaching the event not to the window, but to an element within the shadow root. Is it possible to specify the element to which events are attached in the options?
The text was updated successfully, but these errors were encountered:
When using PhotoSwipe inside a shadow root, zoom functionality fails when clicking on an image, and closing the gallery fails when clicking on the background. This issue arises because the event is attached to the window using "events.add(window)". Consequently, the event's target becomes the host element of the shadow root, rather than the element clicked by the user. This leads to the problem because PhotoSwipe relies on the presence of classes like 'pswp__img', 'pswp__item', 'pswp__zoom-wrap' when processing a click, which the host element lacks. The solution lies in attaching the event not to the window, but to an element within the shadow root. Is it possible to specify the element to which events are attached in the options?
The text was updated successfully, but these errors were encountered: