joshas
joshas

Reputation: 1474

How to prevent Opera from scrolling page with overflow:hidden?

Here's really annoying bug(?) in Opera, best illustrated with example: http://nanotux.com/plugins/fullscreenr/index.html . While the given demo works correctly in other browsers, in Opera it is possible to scroll content using mouse wheel or cursor keys. Is there any workaround for this issue?

Upvotes: 2

Views: 1009

Answers (2)

Jared Farrish
Jared Farrish

Reputation: 49248

It looks like there are two ways to do this:

CSS

position: fixed

In other words...

<body style="position: fixed;">

JS

window.onscroll = function(event){window.location='#test';};

<body id="test">

This option is very herky-jerky, so hopefully the position: fixed will get it done. I tested on Opera 11.

Upvotes: 1

Karel Petranek
Karel Petranek

Reputation: 15164

I think this is an Opera feature. There are some badly written pages that contain text that is cropped by overflow:hidden and this greatly helps accessing them. Opera has always been on the side of the user - the user can do anything with the page and this is just one of the consequences.

If you don't need the space that is being cropped by overflow:hidden, why not shorten it yourself?

Upvotes: 0

Related Questions