Modal input fields cause page jump to top of the page

Hello :waving_hand:

This is a long-standing issue that occurs in the topic when you try to type something into a modal input field. It always jumps to the top of the page, which results in an infinite load until it reaches post 1. It’s still an issue with the Glimmer Post Stream.

It makes very difficult to move posts to another topic because the modal also jumps while loading, other write related process and it also causes problems with the new discourse reaction feature, which opens the emoji picker. When it opens, it automatically focuses on the emoji search input, which produces the same behavior. It jumps to the top of the page and closes the emoji picker… So it happens when the modal input field focused.

This issue seems only happens on iOS.

5 Likes

Weird issue, my guess is that we are bubbling events where we should not.

Maybe @saquetim has some ideas here?

1 Like

What version of iOS do you have @don please? I have seen this issue few times, but Im not able to repro lately.

2 Likes

I’m on iOS 18.6.1 now but I experienced it on the older ones too.

1 Like

Hello :wave:

I think I’ve found what causes this issue.

I’ve disabled the scroll to top here with a simple theme component for testing and it seems works fine now but I’m not sure what’s the reason for this code, so disabling or removing it is probably not the best solution.

Demo: Theme Creator

4 Likes

I wonder if it was not to prevent a bug in iOS which has now been fixed?

2 Likes

That code was only added Oct 2024.

So at least it’s not the cause of the reason I’m following this thread, as my bug was first reported in 2020.

1 Like

I still get this bug, in fact things jump all over the place in mobile Safari, I find it a really bad user experience on mobile.

I also get an annoying bug when scrolling up in a topic to read older posts, as they load it jumps around and I end up skipping over posts.

I do hope it can be fixed.

Here is a video of me scrolling from the bottom to the top of a topic on here.

The video is compressed but the flickering like mad is how it looks when you scroll! And as you can see on some of the page loads it jumps all over the place

This is with the latest iOS 26

Am I alone in experiencing this?

(I know this is slightly off topic but it’s all part of the terrible UX I’ve been getting lately on mobile safari)

I don’t see that.

But I’m on iOS 18 on an iPhone 16 Pro.

No, you aren’t alone. I think it’s this:

So, 26.1 should help.

I’m not sure this is exclusively a iOS 26 problem because it’s not been great for a while now.

I’m on iPhone 16 Pro. Had lots of issues like this. Made worse now with the iOS 26 problems.

I just see things getting worse recently, not better.

You might be right. My iPhone is on 26 and it hasn’t any described symptomps. But I’ve never seen such symptomps on my iPhone & iPad with any OS either.

So, I would blame device here, unless there is some more specific details that differs between yous and mine systems :thinking:

1 Like

What could it be about my device that causes it though?!