diff options
| author | Adam Soltys <[email protected]> | 2026-11-06 23:31:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-06 23:31:43 -0700 |
| commit | 259a95abdec170b7bb6def107b451dde1454293d (patch) | |
| tree | 619f340638ee1812c126513f6bf21abbbd789453 /src/style.css | |
| parent | 4c8754a843335bfa4d84a989fb92f33bc6c26367 (diff) | |
| download | coinosv3-259a95abdec170b7bb6def107b451dde1454293d.tar.gz coinosv3-259a95abdec170b7bb6def107b451dde1454293d.zip | |
Pull down to refresh works in the Android app, the Beta and an installed PWA. "Pull down to refresh isn't working for me in the apk" (Adam, 2026-11-06): measured on his Pixel, the same pull reloads a Chrome tab but not the app — Chrome turns its pull-to-refresh off whenever a page runs full screen, which the TWA (sticky-immersive since 1.14) always does, and a WebView or a standalone PWA has none at all. src/pull-refresh.js takes over where the page reports display-mode standalone or fullscreen, or runs in our WebView (window.CoinosHost), and switches the browser's off there (overscroll-behavior-y: contain) so the two never both fire; a browser tab keeps the browser's. A pull counts only at the top of the page, vertical (sideways swipes stay the tab navigation's), and not from inside something scrolled down (a chat, a picker) or over the page (dialogs, the media viewer, fields); damped like the browser's, a round arrow follows the finger and spins once the pull is far enough, and release reloads (through the network, as a refresh does). On the phone, the local build served into the app: a pull at the top reloads, one while scrolled down only scrolls, a short one does nothing
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
Diffstat (limited to 'src/style.css')
| -rw-r--r-- | src/style.css | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/style.css b/src/style.css index 8a28377..dfe9b9d 100644 --- a/src/style.css +++ b/src/style.css @@ -2087,3 +2087,14 @@ html:has(.call-overlay:not(.call-min)) { overflow: hidden; scrollbar-gutter: aut font-style: italic; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; } .gift-note-input { width: 100%; min-height: 0; font-family: var(--sans); } + +/* pull to refresh, where the browser has none (src/pull-refresh.js) */ +.ptr { + position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; z-index: 2147483000; + width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; + background: var(--paper); color: var(--muted); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); + transform: translate(-50%, -48px); opacity: 0; pointer-events: none; +} +.ptr.ready { color: var(--ink); } +.ptr.spin svg { animation: ptr-spin .8s linear infinite; } +@keyframes ptr-spin { to { transform: rotate(360deg); } } |
