Browse code

Revert "Replace 'dispatch-later' with bare 'dispatch'"

This reverts commit 5f97d9cbe03785c9065faa9028917b5b4e4d7b25.

It turns out this is necessary for stability (the browser would
not _predictably_ scroll).

Joseph Weston authored on 10/12/2021 04:20:21
Showing 1 changed files
... ...
@@ -56,4 +56,6 @@
56 56
         (let [output (execute db cmdline)]
57 57
             (update-in db [:cmdline :history] conj
58 58
                 {:input cmdline :output output}))))
59
-     :fx [[:dispatch [::scroll-to prompt]]]})))
59
+     ; dispatch-later to ensure that the DOM has already been updated,
60
+     ; so that scrollMaxY has been changed appropriately.
61
+     :fx [[:dispatch-later {:ms 10 :dispatch [::scroll-to prompt]}]]})))