Page 1 of 1
NoScript affects scrollbars and scrolling behavior
Posted: Thu Jul 02, 2009 6:01 am
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.
Re: NoScript affects scrollbars and scrolling behavior
Posted: Thu Jul 02, 2009 4:57 pm
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.
Re: NoScript affects scrollbars and scrolling behavior
Posted: Fri Jul 03, 2009 3:59 am
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

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):
But I couldn't make the text and scrollbars reappear this time by disabling NoScript for "file:///" (since I have a local copy).
Re: NoScript affects scrollbars and scrolling behavior
Posted: Fri Jul 03, 2009 2:36 pm
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.
Re: NoScript affects scrollbars and scrolling behavior
Posted: Fri Jul 03, 2009 11:26 pm
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
Re: NoScript affects scrollbars and scrolling behavior
Posted: Sat Jul 04, 2009 5:36 am
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

Re: NoScript affects scrollbars and scrolling behavior
Posted: Sun Jul 05, 2009 10:07 pm
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
Re: NoScript affects scrollbars and scrolling behavior
Posted: Wed Jul 08, 2009 3:27 pm
by therube
Re: NoScript affects scrollbars and scrolling behavior
Posted: Thu Jul 09, 2009 8:55 pm
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
Re: NoScript affects scrollbars and scrolling behavior
Posted: Thu Jul 09, 2009 9:05 pm
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.