day8 / day8/re-com

Scrolling broken after upgrade from v2.23.1 to v2.24.0

Open
#362 1 comment 0 reactions 1 assignee View on GitHub

@mike-thompson-day8 is already working on this.

Since May 3, 2026.

Dominant language
Clojure
Stars
823
Forks
142
PR merge metrics
No merged PRs in 30d

Description

After upgrading a re-com/re-frame app from an old re-com version v2.21.0 to v2.28.2, scrollIntoView calls via reagent/after-render no longer work. Elements cannot be found in the DOM when the scroll effect runs.

On bisecting re-com versions, it turns out that v2.24.0 is the culprit.

Reproduction:

In an app using re-com components, trigger a scroll to an element after a state change:

(defn scroll-to-top
  [elem]
  (when elem
    (.scrollIntoView elem (clj->js {:block  "start"
                                    :inline "nearest"}))))

(reg-fx
  :set-scroll-position
  (fn [panel-id]
    (reagent/after-render
      (fn []
        (scroll-to-top (get-element-by-id panel-id))))))

With v2.23.1: element is found and scrolled to.
With v2.24.0: element is not found in the DOM at the time after-render fires.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.