gramene-search 2.15.1 → 2.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4673,7 +4673,7 @@ var $4f15cd8a7d970b18$export$2e2bcd8739ae039 = $4f15cd8a7d970b18$var$exprViz;
4673
4673
 
4674
4674
 
4675
4675
 
4676
- // Shared vocabulary and helpers for the sorghum_v11 per-gene expression
4676
+ // Shared vocabulary and helpers for the sorghum_v10b per-gene expression
4677
4677
  // attributes (`expr_*__attr_*`). Used by both the Homology tbrowse Expression
4678
4678
  // zone (results/details/exprAttrsZone.js) and the Attribute table view
4679
4679
  // (attrTable/AttrTableView.js) so organ ordering and the ordinal level colors
@@ -20651,12 +20651,31 @@ const $693dd8c7a5607c3a$var$ResultsCmp = (props)=>{
20651
20651
  const divRef = (0, $gXNCa$react.useRef)(null);
20652
20652
  (0, $gXNCa$react.useEffect)(()=>{
20653
20653
  if (v.shouldScroll) {
20654
- const navBarHeight = 0;
20655
- const scrollPosition = divRef.current.offsetTop - navBarHeight;
20656
- window.scrollTo({
20657
- top: scrollPosition,
20658
- behavior: 'smooth'
20659
- });
20654
+ const el = divRef.current;
20655
+ if (el) {
20656
+ // Scroll ONLY the results' own scroll container to this view. The
20657
+ // sidebar and results scroll independently in the sorghumbase app
20658
+ // shell, and el.scrollIntoView can walk every scrollable ancestor
20659
+ // (nudging the sidebar too), so instead find the results pane and
20660
+ // scroll just that. Fall back to the window when the results
20661
+ // aren't in a dedicated scroll pane (other layouts / mobile).
20662
+ let pane = el.parentElement;
20663
+ while(pane){
20664
+ const oy = window.getComputedStyle(pane).overflowY;
20665
+ if ((oy === 'auto' || oy === 'scroll') && pane.scrollHeight > pane.clientHeight) break;
20666
+ pane = pane.parentElement;
20667
+ }
20668
+ if (pane) {
20669
+ const top = el.getBoundingClientRect().top - pane.getBoundingClientRect().top + pane.scrollTop;
20670
+ pane.scrollTo({
20671
+ top: top,
20672
+ behavior: 'smooth'
20673
+ });
20674
+ } else window.scrollTo({
20675
+ top: el.getBoundingClientRect().top + window.scrollY,
20676
+ behavior: 'smooth'
20677
+ });
20678
+ }
20660
20679
  props.doCancelShouldScroll();
20661
20680
  }
20662
20681
  }, [