diff --git a/__tests__/src/components/ScrollTo.test.js b/__tests__/src/components/ScrollTo.test.js index eb2f38c157..9e4ac8234e 100644 --- a/__tests__/src/components/ScrollTo.test.js +++ b/__tests__/src/components/ScrollTo.test.js @@ -12,7 +12,7 @@ describe('ScrollTo', () => { containerRef = createRef(); render(
); - containerRef.current.domEl = { + containerRef.current = { getBoundingClientRect: () => containerBoundingRect, getElementsByClassName: () => [{ scrollTo }], }; diff --git a/src/components/CompanionWindow.js b/src/components/CompanionWindow.js index b4a2537ae3..d4cea6f4c5 100644 --- a/src/components/CompanionWindow.js +++ b/src/components/CompanionWindow.js @@ -93,7 +93,7 @@ export class CompanionWindow extends Component { const { ariaLabel, classes, paperClassName, onCloseClick, updateCompanionWindow, isDisplayed, position, t, title, children, titleControls, size, - defaultSidebarPanelWidth, defaultSidebarPanelHeight, + defaultSidebarPanelWidth, defaultSidebarPanelHeight, innerRef, } = this.props; const isBottom = (position === 'bottom' || position === 'far-bottom'); @@ -112,6 +112,7 @@ export class CompanionWindow extends Component { return ( {}, paperClassName: '', diff --git a/src/components/ScrollTo.js b/src/components/ScrollTo.js index 0e5c29b6f3..c4aed0adb7 100644 --- a/src/components/ScrollTo.js +++ b/src/components/ScrollTo.js @@ -36,9 +36,9 @@ export class ScrollTo extends Component { containerBoundingRect() { const { containerRef } = this.props; - if (!containerRef || !containerRef.current || !containerRef.current.domEl) return {}; + if (!containerRef || !containerRef.current) return {}; - return containerRef.current.domEl.getBoundingClientRect(); + return containerRef.current.getBoundingClientRect(); } /** @@ -59,14 +59,14 @@ export class ScrollTo extends Component { } /** - * The container provided in the containersRef dome structure in which scrolling + * The container provided in the containersRef dom structure in which scrolling * should happen. */ scrollableContainer() { const { containerRef } = this.props; - if (!containerRef || !containerRef.current || !containerRef.current.domEl) return null; - return containerRef.current.domEl.getElementsByClassName('mirador-scrollto-scrollable')[0]; + if (!containerRef || !containerRef.current) return null; + return containerRef.current.getElementsByClassName('mirador-scrollto-scrollable')[0]; } /** diff --git a/src/components/SidebarIndexList.js b/src/components/SidebarIndexList.js index 765a3ced0f..9d6b80f50c 100644 --- a/src/components/SidebarIndexList.js +++ b/src/components/SidebarIndexList.js @@ -52,6 +52,7 @@ export class SidebarIndexList extends Component { key={canvas.id} sx={{ paddingRight: 1, + position: 'initial', }} divider onClick={onClick} diff --git a/src/components/WindowSideBarAnnotationsPanel.js b/src/components/WindowSideBarAnnotationsPanel.js index f8f41047d7..d6b2937e0c 100644 --- a/src/components/WindowSideBarAnnotationsPanel.js +++ b/src/components/WindowSideBarAnnotationsPanel.js @@ -35,7 +35,6 @@ export class WindowSideBarAnnotationsPanel extends Component { windowId={windowId} id={id} ref={this.containerRef} - otherRef={this.containerRef} titleControls={} > {