Comments (5)
I'm getting this too - it's happening because the scrollbarSize is 0 on FF under OSX (which is true, it pops up over the page) so Antiscroll doesn't extend its inner div to hide the scrollbar, but FF doesn't support scrollbar hiding like Chrome/Safari, so the result is that the native scrollbar pops up over the non-native one.
I'm not sure how to fix this properly, but a (nasty) workaround is to modify the scrollbarSize() function in antiscroll.js so that it returns 17 if the result is 0. This extends the inner div even in browsers that don't need it, but that doesn't seem to have any ill effects in the limited testing I've done:
function scrollbarSize () {
if (size === undefined) {
var div = $(
'<div class="antiscroll-inner" style="width:50px;height:50px;overflow-y:scroll;'
+ 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;width:100%"/>'
+ '</div>'
);
$('body').append(div);
var w1 = $(div).innerWidth();
var w2 = $('div', div).innerWidth();
$(div).remove();
size = w1 - w2;
}
return size ? size : 17;
};
from antiscroll.
That would extend the content area 17 pixels beyond the right edge, too, though. I think the only way for this to work in FX is if they supported us hiding the scrollbar via CSS. For now I'm just letting both up even though it's ugly
from antiscroll.
Extending the content area beyond the right edge is how it works in IE.
EDIT: Oh yeah I see, FF in OSX has actual content in that area whereas IE doesn't. Fortunately I don't have anything important to the right of the scrolled area...
from antiscroll.
Right, because the idea behind Antiscroll is to push only the area taken up by the scrollbar beyond view. But Firefox's scrollbar is an overlay so you'd be pushing some content over along with the visible scrollbar. I think it should be reported to the Firefox team because this sucks!!
from antiscroll.
Duplicate of #77
from antiscroll.
Related Issues (20)
- Demo is broken HOT 6
- Chrome MacOSX Bug HOT 1
- Does nothing in CHROME 27 - WIN 7
- Compatibility with jQuery 1.10.2 HOT 1
- can somebody update the mousewheel library to latest version?
- scrollbar on top of table
- [enhancement] Add missing bower.json. HOT 2
- Native scrollbars are visible in Firefox and IE HOT 5
- Releases? Tags? HOT 7
- scrollbarSize() calculation issue for scaled page (FireFox)
- change overflow-{x,y} attribute to hidden after antiscroll construction
- Is this still maintained? HOT 3
- Yosemite Scrollbar Bug HOT 2
- npm support is missing HOT 4
- Please create an initial version HOT 1
- Update demo link HOT 1
- [Suggestion] Respect OS settings
- Scroll Isolation
- Is scrollbar.js under dist folder necessary?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antiscroll.