Skip to content

fix(themes): keep article nav bar pinned to bottom in iOS standalone PWAs - #8933

Merged
Alkarex merged 3 commits into
FreshRSS:edgefrom
Otolock:pwa-toolbar-bug-fix
Jun 20, 2026
Merged

Alkarex merged 3 commits into
FreshRSS:edgefrom
Otolock:pwa-toolbar-bug-fix

Conversation

@Otolock

@Otolock Otolock commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Problem

When FreshRSS is used as a standalone PWA on iOS (added to the home screen), the article navigation bar (#nav_entries, the prev / up / next buttons) detaches from the bottom and drifts to the middle of the screen after tapping the prev/next buttons.

Fixes #8829.

Cause

#nav_entries is position: fixed; bottom: 0. On iOS standalone PWAs, WebKit fails to repaint position: fixed elements after a programmatic scroll. Tapping prev/next runs next_entry/prev_entry → toggleContent, which scrolls the article container in JS (box_to_move.scrollTop = …). That scripted scroll is the trigger, which is why the bar wanders only after using those buttons — and why it does not happen in regular Safari, where the browser chrome provides repaint hooks the standalone shell lacks.

This also explains why #8833 did not fix it: its top: auto was a no-op, because nothing in the stylesheet ever sets a top value on #nav_entries.

Fix

Promote #nav_entries to its own compositor layer (transform: translateZ(0) + will-change: transform). WebKit then keeps it pinned to the viewport across programmatic scrolls. Minimal, vanilla CSS, no new dependencies.

frss.rtl.css was regenerated with make rtl (not hand-edited).

Testing

Verified on an iPhone home-screen PWA (Mobile Safari 26.x): with the change, the bar stays anchored at the bottom while tapping prev/next through articles. Behaviour in desktop/regular Safari is unchanged.

Otolock added 2 commits June 20, 2026 12:09
…PWAs

On iOS standalone PWAs, WebKit fails to repaint `position: fixed` elements
after a programmatic scroll, so the article navigation bar (#nav_entries)
drifts to the middle of the screen after tapping the prev/next buttons
(which scroll the article container in JS). This does not happen in regular
Safari, where the browser chrome provides repaint hooks the standalone shell
lacks.

Promote #nav_entries to its own compositor layer (transform: translateZ(0))
so WebKit keeps it pinned to the viewport across programmatic scrolls.

This supersedes FreshRSS#8833, whose `top: auto` was a no-op: nothing in the
stylesheet ever sets a `top` value on #nav_entries, so it could not affect
positioning.

Fixes FreshRSS#8829
@Alkarex Alkarex added this to the 1.30.0 milestone Jun 20, 2026
@Alkarex Alkarex added the UI 🎨 User Interfaces label Jun 20, 2026
Comment thread p/themes/base-theme/frss.css Outdated
pinned to the viewport after a programmatic scroll (e.g. prev/next entry),
working around a WebKit bug that otherwise lets it drift to mid-screen. */
transform: translateZ(0);
will-change: transform;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot test Safari. Could you double-check whether will-change is necessary? transform might be sufficient.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the review. I tested it without will-change and the fix works with transform only. I've pushed a commit with this revision.

The compositor layer that keeps #nav_entries pinned in iOS standalone PWAs
comes entirely from transform: translateZ(0). The accompanying
will-change: transform was redundant — it only hints at upcoming changes and
adds nothing to an element already promoted to its own layer.

Removing it leaves the bar pinned across programmatic scrolls (verified on an
iOS standalone PWA), with no behavioural change.

Based on maintainer feedback on FreshRSS#8933.
@Alkarex
Alkarex merged commit 5c5b0b9 into FreshRSS:edge Jun 20, 2026
1 check passed
@Otolock

Otolock commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@Alkarex upon further usage following these commits, I found that my fix worked temporarily but whenever the DOM was updated introducing new content, the bug returned. Can this be reverted? I will continue to debug.

@Alkarex

Alkarex commented Jun 21, 2026

Copy link
Copy Markdown
Member

@Alkarex upon further usage following these commits, I found that my fix worked temporarily but whenever the DOM was updated introducing new content, the bug returned. Can this be reverted? I will continue to debug.

Thanks for the additional feedback. For reverting, please send a new PR

Alkarex pushed a commit that referenced this pull request Jun 21, 2026
…ndalone PWAs (#8933)" (#8934)

This reverts commit 5c5b0b9 (PR #8933).

The `transform: translateZ(0)` added to #nav_entries promotes the element to
its own compositor layer, but a non-`none` transform also makes the element a
containing block for `position: fixed` descendants and establishes a new
stacking context. That side effect introduced a regression, so this restores
the previous behaviour while a less invasive fix for #8829 is worked out.

Reverting the whole PR (CSS + CREDITS.md) for a clean rollback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI 🎨 User Interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] bottom bar detaches from bottom, wanders into middle of screen

2 participants