Skip to content

fix(refresher): prevent focus-related scroll jumps on refresh #30636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025
Merged

Conversation

ShaneK
Copy link
Member

@ShaneK ShaneK commented Aug 15, 2025

Issue number: resolves #


What is the current behavior?

Currently, if you focus on something and then refresh with a refresher, the browser will try to scroll to what's focused after refreshing. This can be an unexpected and disrupting user experience.

Screenshot-2025-08-15.at.12.44.20.mp4

What is the new behavior?

With these changes, we blur the active element to prevent the browser from trying to scroll back to something off screen after refreshing.

Also, I did try to create regression tests for this, but playwright actually doesn't currently seem to make it possible as far as I can tell - that's actually what I spent most of my time on this issue trying to do. Looks like the only way to trigger the refresher with playwright uses mouse click events, which inherently blurs the active element. You need to use cursor events for this to work, because cursor events do not cause a blur on the active element.

Screenshot-2025-08-15.at.12.38.08.mp4

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

8.7.3-dev.11755285796.12743331

@ShaneK ShaneK requested a review from a team as a code owner August 15, 2025 19:46
@ShaneK ShaneK requested a review from gnbm August 15, 2025 19:46
Copy link

vercel bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Aug 15, 2025 7:46pm

@github-actions github-actions bot added the package: core @ionic/core package label Aug 15, 2025
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good! ✅

@ShaneK ShaneK added this pull request to the merge queue Aug 18, 2025
Merged via the queue into main with commit 1899b49 Aug 18, 2025
61 checks passed
@ShaneK ShaneK deleted the IONIC-42 branch August 18, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants