NoScript affects scrollbars and scrolling behavior

Ask for help about NoScript, no registration needed to post
paul.ru

NoScript affects scrollbars and scrolling behavior

Post by paul.ru »

Hi
I've noticed a strange bug on this particular page
http://lingvo.yandex.ru/de?text=voll%20&dict=Universal
I have an archived version of this - in case something has changed - http://rapidshare.com/files/250936129/N ... g.rar.html

I'm using Firefox 3.5 under Windows XP

So, when I allow scripts on this page, the scrollbars disappear, no matter how I resize the window. When I tried middle-click and scrolled down, part of previously invisible text did not render at all.

When I forbid scripts there, scrollbars do appear, but middle-click scrolling just gets impossible - no arrowed round thing appears but scrollbrs are OK.

I've noticed that effect only on that very page.
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoScript affects scrollbars and scrolling behavior

Post by therube »

Are these scrollbars within the page itself (cause if so, I don't see any), or is it the browser scrollbars that go missing?

Can you post a screenshot.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
paul.ru

Re: NoScript affects scrollbars and scrolling behavior

Post by paul.ru »

These are the browser scrollbars. By the way, the bug seems to be gone on that URL, please download the archived version (which still shows the bug for me): http://rapidshare.com/files/250936129/N ... g.rar.html

Image
There's still a plenty of text down there, and if I attempt a middle-click scroll, this text is missing (i.e. I can't even select it):
Image

But I couldn't make the text and scrollbars reappear this time by disabling NoScript for "file:///" (since I have a local copy).
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoScript affects scrollbars and scrolling behavior

Post by therube »

From (your archived copy of the website, in) _slovari.css, at the very end of the file, you will find ...

Original:

Code: Select all

.image-btn-disabled{display:none}body,html{overflow:hidden!important;width:100%;height:100%}.content-container{position:relative;width:100%;height:100%;overflow:auto}.article
Current:

Code: Select all

.image-btn-disabled{display:none}.article
Difference:

Code: Select all

body,html{overflow:hidden!important;width:100%;height:100%}.content-container{position:relative;width:100%;height:100%;overflow:auto}
And whatever "Difference" does, as you described, it causes the browser scrollbars to disappear.

Oh, & NoScript has no bearing on this matter at all.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
User avatar
Foam Head
Senior Member
Posts: 57
Joined: Sun May 03, 2009 5:35 pm

Re: NoScript affects scrollbars and scrolling behavior

Post by Foam Head »

therube wrote: Difference:

Code: Select all

body,html{overflow:hidden!important;width:100%;height:100%}
.content-container{position:relative;width:100%;height:100%;overflow:auto}
And whatever "Difference" does, as you described, it causes the browser scrollbars to disappear.
Yup, it's these CSS rules that are hiding the scrollbars. Per the CSS 2.1 definition of overflow, using "hidden" means anything that doesn't fit into the container is truncated without scrollbars. Even tho the .content-container sets overflow:auto, the "!important" modifier on the overflow:hidden attribute overrides it which is why there are no scrollbars.

-Foam
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
paul.ru

Re: NoScript affects scrollbars and scrolling behavior

Post by paul.ru »

OK, sorry for disturbing you, it just somehow interfered with scripts being allowed or not. Perhaps when the page was reloaded with scripts on, it also loaded a different CSS - that's why I couldn't reproduce this with my local copy. Now it's not the case with that page.
Thanks anyway, I've been using NoScript for ages ;)
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5
User avatar
Foam Head
Senior Member
Posts: 57
Joined: Sun May 03, 2009 5:35 pm

Re: NoScript affects scrollbars and scrolling behavior

Post by Foam Head »

paul.ru wrote:OK, sorry for disturbing you, it just somehow interfered with scripts being allowed or not. Perhaps when the page was reloaded with scripts on, it also loaded a different CSS - that's why I couldn't reproduce this with my local copy. Now it's not the case with that page.
No sweat, paul. And FWIW, it's not unusual for web developers to start content as "invisible" and then use scripts to selectively show it as appropriate. So when scripts are disabled, the page's visible content is truncated.

-Foam
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoScript affects scrollbars and scrolling behavior

Post by therube »

This is a new bug but works by the same principle.

Bug 502447 - style.overflow="hidden" followed by style.overflow="" fails to reshow scrollbars

Using the testcase, https://bugzilla.mozilla.org/attachment.cgi?id=386873, you can alternatively show/hide the scrollbar.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
User avatar
Foam Head
Senior Member
Posts: 57
Joined: Sun May 03, 2009 5:35 pm

Re: NoScript affects scrollbars and scrolling behavior

Post by Foam Head »

therube wrote:This is a new bug but works by the same principle.
I don't see how this is related to paul.ru's issue. Tho I can't reproduce the failure in my FireFox 3.5 (the testcase properly re-showed the scrollbar for me *shrug*), the bug appears to be a coding issue in Mozilla/SeaMonkey that is causing the overall document's scrollbar to not show when it should.

paul.ru's issue was not a bug, but (I assume) a case where the CSS defaulted to hiding content and then used JavaScript to show the content as necessary. With NoScript blocking the JavaScript, the content looked broken to paul.ru.

-Foam
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoScript affects scrollbars and scrolling behavior

Post by therube »

By coincidence I happened to run across that particular bug (which is likely only affecting the most recent nightly builds), so I just thought I'd mention it here.

And as you explained "difference:", the testcase too makes it apparent what was happening - that the code was simply doing what was expected.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
Post Reply