fix: restore default card icons after back-navigation - #1214
fix: restore default card icons after back-navigation#1214khushal-winner wants to merge 1 commit into
Conversation
|
Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, please review the Layer5 Community Welcome Guide and sure to join the community Slack. |
|
Warning Review limit reached
Next review available in: 49 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe documentation homepage now restores each documentation card image from its default source when the page is shown, including browser back and forward navigation. ChangesCard icon restoration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This is a localized browser-behavior fix for restoring card icons after back-navigation, with no actionable merge-blocking risk remaining beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR addresses an iOS BFCache back-navigation behavior where homepage card icons can remain stuck in their hover state by resetting each card icon back to its default image on pageshow.
Changes:
- Add a
pageshowevent listener to restore each homepage card icon to itsdata-defaultimage using the existingrestoreImagehelper.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Khushal Malhotra <redmi5a3217@gmail.com>
086d8b6 to
02459a2
Compare
Fixes #1209
Changes
content/en/_index.md: added apageshowlistener that resets eachcard icon to its
data-defaultimage via the existingrestoreImagehelper when the homepage is restored from the back/forward cache.
Why
On iOS (Safari and Chrome), tapping a card fires
mouseover, butmouseoutnever runs because navigation interrupts it. The page is thenrestored from WebKit's cache with the hover icon still set, and nothing
resets it. Android is unaffected; this change is a no-op there.
Tested locally with
npm run build; needs a physical iPhone check on thepreview deployment to confirm the fix.
Signed commits
Summary by CodeRabbit