mirador icon indicating copy to clipboard operation
mirador copied to clipboard

Gallery scrollIntoView conflicts with the embedding page

Open regisrob opened this issue 2 years ago • 0 comments

The recent feature "Scroll the selected image to view in Gallery" (#3530) is a useful improvement but unfortunately it seems to conflict with the embedding page (it works fine only when Mirador takes the entire window, without extra content above or below the Mirador frame).

Context : we have web pages where Mirador is embedded in an iframe somewhere in the content section.

Unexpected behavior 1 : when the page loads the focus is given to the first thumbnail in the Gallery view, and the overall page is scrolled towards the position of the thumbnail, skipping everything above the iframe.

Unexpected behavior 2 : within the Mirador window, when you navigate from the Image view to the Gallery view, the entire web page is scrolled to a given point, which makes the page "jump" unexpectedly.

It seems to be related to the scrollIntoView element, which does a bit whatever it wants with the containing page (?).

This problem looks blocking for adopters using Mirador embedded within a larger page.

cc @priyamanalil

regisrob avatar Jun 03 '22 14:06 regisrob