@@ -122,7 +122,7 @@ class ScrollScreenClass {
122122 return dom && document . defaultView && document . defaultView . getComputedStyle ?
123123 document . defaultView . getComputedStyle ( dom ) : { } ;
124124 }
125- isScroll = ( dom ) => {
125+ isScroll = ( dom , deltaY ) => {
126126 const style = this . getComputedStyle ( dom ) ;
127127 const overflow = style . overflow ;
128128 const overflowY = style . overflowY ;
@@ -131,12 +131,15 @@ class ScrollScreenClass {
131131 // dom.parentNode === document 解决在滚动条上滚动取不到 body;
132132 if ( dom === document . body || ! dom || dom . parentNode === document ) {
133133 return false ;
134- } else if ( dom . scrollHeight > dom . offsetHeight
135- && isScrollOverflow
136- && dom . scrollTop < dom . scrollHeight ) {
134+ } else if (
135+ dom . scrollHeight > dom . offsetHeight &&
136+ isScrollOverflow &&
137+ dom . scrollTop + dom . offsetHeight + deltaY < dom . scrollHeight &&
138+ dom . scrollTop + deltaY > 0
139+ ) {
137140 return true ;
138141 }
139- return this . isScroll ( dom . parentNode ) ;
142+ return this . isScroll ( dom . parentNode , deltaY ) ;
140143 }
141144 limitNum = ( min , max ) => {
142145 if ( this . vars . loop ) {
@@ -148,11 +151,12 @@ class ScrollScreenClass {
148151 }
149152 }
150153 onWheel = ( e ) => {
151- e . preventDefault ( ) ;
152- if ( this . isScroll ( e . target ) ) {
154+ const deltaY = e . deltaY ;
155+ if ( this . isScroll ( e . target , deltaY ) ) {
153156 return ;
154157 }
155- const deltaY = e . deltaY ;
158+ e . preventDefault ( ) ;
159+
156160 const mapped = this . mapped ;
157161 if ( this . rafID === - 1 && deltaY !== 0 && this . toHeight === - 1 ) {
158162 const winHeight = windowHeight ( ) ;
0 commit comments