                    [:div.action-log-messages
                     (common/messages (:messages action))
                     [:i.click-to-scroll.fa.fa-arrow-circle-o-down.pull-right
-                     {:on-click #(let [node (om/get-node owner)
-                                       body (.-body js/document)]
-                                   (set! (.-scrollTop body) (- (+ (.-y (goog.style/getRelativePosition node body))
-                                                                  (.-height (goog.style/getSize node)))
-                                                               (.-height (goog.dom/getViewportSize)))))}]
+                     {:on-click #(scroll-to-bottom (.-parentNode (.-currentTarget %)))}]
                     (when (:bash_command action)
                       [:span
                        (when (:exit_code action)

                   [:div.action-log-messages
                    (common/messages (:messages action))
                    [:i.click-to-scroll.fa.fa-arrow-circle-o-down.pull-right
                     {:on-click #(let [target (.-parentNode (.-currentTarget %))]
                                   (.scrollIntoView target false))}]

                    (when (:bash_command action)
                      [:span

        (html
         [:span {:dangerouslySetInnerHTML
                 #js {"__html" trailing-out}}])))))

(defn scroll-to-bottom [element]
  (.scrollIntoView element false))

(defn action [action owner {:keys [uses-parallelism?] :as opts}]
  (reify
