Sorry I'm reposting this from my original report but I figure it deserves it's own post.
I've tried to debug this a little using the remote debugging.
I was able to capture an event that I think is triggering the scroll to top.
￼￼￼I believe it's this line of code, the value is set on this line which ends up being the body element on both mobile and desktop browsers. I'm not sure why the focus call brings it to the top on mobile and it doesn't on desktop.
Is there anything I can do to modify this behaviour?
Thanks for your feedback.
This issue comes from the WordPress core itself, Meta Box just uses the media popup of WordPress to upload/select the media files so you can see it happens with MB custom fields.
In this case, I recommend creating a bug report in WordPress Trac https://core.trac.wordpress.org/
or create a topic on the WordPress support forum https://wordpress.org/support/forum/how-to-and-troubleshooting/
I respectfully disagree that the issue lies solely in the WordPress code. If I bring up the media browser from say the edit page or post in iOS, it does not jump to the top of the page. Is it the way metabox is calling the media functions?
Did you check the issue with the Featured Image option of WordPress?
I tested a non-metabox media browser in the WordPress in the edit page. In that case the clickedOpenerEl variable is a <figure> element, as opposed to <body> in metabox. So I don't know why metabox isn't getting a better value for that. I'll see what I can find in the source code there if I can find it.
I'm reaching my limits to debug this any further so I hope metabox support can help me out the rest of the way.
I just wanted to clarify that I see this using the 'MB Custom Table' extension, I just tried adding the "Image Advanced" as a custom field to a post type and it behaves normally like the other places that open the media popup. So I think the issue is likely related to the custom table extension, maybe along with me using it in a group.
Hopefully you can help me.
Unfortunately, our development team has taken a look at this issue but still not had a solution to resolve this. So I will leave this topic as Open status if there are others here who will chime in with better answers and can advise us to help you. Sorry for not being helpful in this case.