mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix(mobile): reset scroller margin-bottom to 0 after modal/popup closed
This commit is contained in:
@@ -26,7 +26,10 @@
|
||||
(ion/modal
|
||||
{:isOpen (boolean open?)
|
||||
:presenting-element presenting-element
|
||||
:onDidDismiss (fn [] (mobile-state/set-modal! nil))
|
||||
:onDidDismiss (fn []
|
||||
(mobile-state/set-modal! nil)
|
||||
(state/clear-edit!)
|
||||
(state/pub-event! [:mobile/keyboard-will-hide]))
|
||||
:mode "ios" ;; force card modal for android
|
||||
:expand "block"}
|
||||
|
||||
|
||||
@@ -70,14 +70,6 @@
|
||||
(set! shui/popup-show! popup-show!)
|
||||
(set! shui/popup-hide! popup-hide!)
|
||||
|
||||
(rum/defc inner-content <
|
||||
{:will-unmount (fn [state]
|
||||
(state/clear-edit!)
|
||||
(init/keyboard-hide)
|
||||
state)}
|
||||
[content-fn]
|
||||
(content-fn))
|
||||
|
||||
(rum/defc popup < rum/reactive
|
||||
[]
|
||||
(let [{:keys [open? content-fn opts]} (rum/react mobile-state/*popup-data)
|
||||
@@ -101,7 +93,10 @@
|
||||
{:isOpen (boolean open?)
|
||||
:initialBreakpoint initial-breakpoint
|
||||
:breakpoints breakpoints
|
||||
:onDidDismiss (fn [] (mobile-state/set-popup! nil))
|
||||
:onDidDismiss (fn []
|
||||
(mobile-state/set-popup! nil)
|
||||
(state/clear-edit!)
|
||||
(state/pub-event! [:mobile/keyboard-will-hide]))
|
||||
:expand "block"}
|
||||
(:modal-props opts))
|
||||
(ion/content
|
||||
@@ -111,4 +106,4 @@
|
||||
[:h2.py-2.opacity-40 title])
|
||||
(when content-fn
|
||||
(mobile-ui/classic-app-container-wrap
|
||||
(inner-content content-fn)))]))))
|
||||
(content-fn)))]))))
|
||||
|
||||
Reference in New Issue
Block a user