Fix View updates on Android: bundled notes, portal stack, tap handling.
Trigger cinny-mobile / dispatch (push) Successful in 2s
Trigger cinny-mobile / dispatch (push) Successful in 2s
Bundle update markdown at build time for Capacitor, portal into portalContainer above Settings, defer open to avoid FocusTrap closing on the same tap, and disable click-outside dismiss.
This commit is contained in:
@@ -4,7 +4,6 @@ import FocusTrap from 'focus-trap-react';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
config,
|
||||
Dialog,
|
||||
IconButton,
|
||||
Overlay,
|
||||
@@ -48,6 +47,9 @@ export function UpdatesDialog({
|
||||
setShowOlderList(false);
|
||||
};
|
||||
|
||||
const portalTarget =
|
||||
document.getElementById('portalContainer') ?? document.body;
|
||||
|
||||
return createPortal(
|
||||
<div className={css.PortalLayer}>
|
||||
<Overlay open backdrop={<OverlayBackdrop />}>
|
||||
@@ -55,8 +57,7 @@ export function UpdatesDialog({
|
||||
<FocusTrap
|
||||
focusTrapOptions={{
|
||||
initialFocus: false,
|
||||
onDeactivate: onClose,
|
||||
clickOutsideDeactivates: true,
|
||||
clickOutsideDeactivates: false,
|
||||
escapeDeactivates: stopPropagation,
|
||||
}}
|
||||
>
|
||||
@@ -181,6 +182,6 @@ export function UpdatesDialog({
|
||||
</OverlayCenter>
|
||||
</Overlay>
|
||||
</div>,
|
||||
document.body
|
||||
portalTarget
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user