Comments (7)
I'm working on it
from jquery.nicescroll.
show() is called in a couple of places in the onResize event, shown below:
if (!self.haswrapper&&!self.ispage) {
var vis = (self.win.css('display')!='none');
if (!vis) {
if (self.visibility) self.hide();
return false;
} else {
self.show();
}
}
...
if (self.page.maxh==0) {
self.hide();
self.scrollvaluemax = 0;
self.scroll.y = 0;
self.scrollratio = {x:0,y:0};
self.cursorheight = 0;
self.locked = true;
self.setScrollTop(0);
return false;
}
else self.show();
The visibility variable set by show() and hide() seems to only be used as a short circuit to prevent showing a scrollbar that's already visible. I've repurposed this variable for my situation to indicate whether the user manually hid the scrollbar. Perhaps in the future there should be a check to see if the user manually hid the bar?
from jquery.nicescroll.
I found the bug!
When browser zoom is actived jquery returns strange floating values for innerWidth/innerHeight.
So I bypass jquery to fix this problem.
(you are right, visibility behavior needs a rewrite!)
from jquery.nicescroll.
Quick fix on 2.9.0 source code.
At line 869 change this code
self.view = {
w:(self.ispage) ? self.win.width() : self.win.innerWidth(),
h:(self.ispage) ? self.win.height() : self.win.innerHeight()
};
with this version
self.view = {
w:(self.ispage) ? self.win.width() : parseInt(self.win[0].clientWidth),
h:(self.ispage) ? self.win.height() : parseInt(self.win[0].clientHeight)
};
from jquery.nicescroll.
I think that's actually separate from what I was referring to. My situation is a little unusual in that I have overlapping divs where only one is visible at a time, so the problem is caused by having two separate nicescroll divs where only one should be visible at a time. When you change zoom onResize is triggered which overrides my manual hide of one of the nicescroll divs. I end up with the scrollbar from the invisible div being visible, so there's two scrollbars.
from jquery.nicescroll.
I had rewritten visibility routines.
Try DEV version:
http://www.areaaperta.com/nicescroll/dev/float2.html
from jquery.nicescroll.
Aha, I tested the dev version with my site and it works great. Thanks for
looking into this.
from jquery.nicescroll.
Related Issues (20)
- Respect prefers-reduced-motion: reduce
- Scrollbar in mobile HOT 1
- css scroll-snap-type compatibility HOT 2
- Middle-click scroll does not work HOT 2
- scroll event HOT 2
- niceScroll with re sizable textarea height.
- sorry nothing - was cleaning my keyboard
- overflow:hidden for body not work in nicescroll in active HOT 2
- users script for browser
- ERROR: [Intervention] Unable to preventDefault .......... HOT 7
- The page doesn't scroll to show search results when we use Ctrl+F to search text in page HOT 1
- Touchpad scroll on horizontal gets too hard and sticky HOT 1
- Smoothscroll
- [Webpack] - niceScroll is not a function
- Unable to preventDefault inside passive event listener due to target being treated as passive.
- Nice Scroll doesnโt work on ios
- code is wrong
- Browser search with Ctrl + f not scrolling to searched results on enter with nicescroll.
- nicescroll not working well on android Google Chrome in Samsung Galaxy fold 2
- scrollbar get wrong position
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 jquery.nicescroll.