Preventing sites from moving my vertical scroll position

Is there a way to prevent sites from moving the brower’s vertical position and let me be responsible for scrolling the page up and down, instead of the site dictating it? I find the practice of a site controlling my page movement to be disorientating to my vision because I have to pause and adjust to it. Here’s an especially irritating example of Cathay Pacific, on all their worldwide sites in fact.

cathaypacific co uk

The browser begins by showing the airport departure and destination fields relatively low in the browser window. The user then clicks the destination field and begins to type the destination, but the movement of the page is unwelcome.

Cathay Pacific’s site immediately scrolls the page up, which is annoying and disorientating.

Is this an issue with other browser. Because this looks like a screen size issue. An @media code

Yes, it happens with Firefox and IE, and it’s a personal preference rather than a problem. The websites, such as the Cathay Pacific example, are controlling vertical scroll. If there’s a way to disable it, it would be great.

I don’t have a solution and would also like to see it. However, it seems that the behavior you describe is a “feature” of websites that use “focus” of form fields - when the field has focus, the … javascript? … makes the browser shift to the location of the field. Wish I had a solution, because there’ve been plenty of sites that drove me batty with that.


Thanks @hnktong I’m glad I’m not the only one who doesn’t approve of sites that attempt to wield control. The reason Cathay Pacific is doing it, is because the screen begins with a large picture occupying most of the window, with the itinerary fields at the bottom, and once you begin typing, they want you to see their special offers. The fact that it actually slides the scrollbar on your own machine, I find objectionable. I’ve even been looking at the Brave source code to see where the function is located, as @Dgenies mentioned it’s part of @media function. So far, I can’t find it.

I’m pretty sure it has nothing to do with the browser per se, @OsoB, so perusing Brave source code may be fruitless. Rather, my understanding is that the movement is a function of CSS or HTML or javascript and the way forms are handled when the “focus” attribute is used by the website. The scroll bar “thumb” moves only because of the jump to the field that has focus as opposed to the site acting like a scroll wheel, as I understand it. So it might be more useful to look for an extension on the Chrome Web Store or for a hack that defeats the focus attribute and moving to the field that has focus.

A possible workaround: changing zoom level should reduce the effect (macOS CMD and minus sign, Windows CTRL and minus sign), but can result in text too tiny to read.

Another possible workaround: Block images for specific sites (Cathay Pacific here) to reduce the effect. Go to Settings --> Advanced --> Content Settings --> Images (or type brave://settings/content/images in address bar and hit return) and add the site to the block list. In the past on other browsers when I’ve done this, clicking or right-clicking the place where the image would have been allows loading of specific images. I’m too lazy to try it out in Brave right now (and I have some guilt about that, but I also have a lot of inertia :P). Here’s what it looks like (click image to embiggen, as Phil Plait says):

Thanks again @hnktong I appreciate you having a look. I disabled images as you suggested and it works in regard to disabling them in Cathay Pacific’s site, but it unfortunately doesn’t change the positioning of the fields relative to the screen. In other words, the input box for travel from and to destination are still located right at the bottom.

I see what you mean about focus. However, it isn’t the case that these two input fields aren’t within the screen’s existing content - rather they’re visible already on the screen. I’m actually clicking in one of those input fields, so the field already has focus. The scroll doesn’t happen yet though. Only when I press a key, does it then hijack the scroll. If I move the window back down again, it stays where I move it, but only temporarily.

Yes, it’s a function of the site and not an issue with the browser. The browser is only doing what it’s been told. However, I think the way I see it, is that ever-advancing browser standards (the functionality) has provided the mechanism through which web creators can gain greater control over the user interface.

I think ideally there ought to be a setting that sets the premise — “only my keyboard or mouse action should be responsible for moving the scroll bar”.

It would be great to offer a setting that prevents sites from vertical scrolling.

This topic was automatically closed after 30 days. New replies are no longer allowed.