improve(mobile): cursor caret overlap when bottom boundary inputing

This commit is contained in:
charlie
2022-11-28 16:01:40 +08:00
parent 1413fa4b11
commit bdeab4debc

View File

@@ -1300,7 +1300,7 @@
vw-height (or (.-height js/window.visualViewport)
(.-clientHeight js/document.documentElement))
;; mobile toolbar height: 40px
scroll (- cursor-y (- vw-height (+ @keyboard-height 40)))]
scroll (- cursor-y (- vw-height (+ @keyboard-height (+ 40 4))))]
(cond
(and to-vw-one-quarter? (> cursor-y (* vw-height 0.4)))
(set! (.-scrollTop main-node) (+ scroll-top (- cursor-y (/ vw-height 4))))