8000 - Fixed bug: overflow:scroll isn't scrollable inside scrollOverflow #… · webdeveloper4testing/fullPage.js@ae6e90d · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit ae6e90d

Browse files
committed
- Fixed bug: overflow:scroll isn't scrollable inside scrollOverflow alvarotrigo#3725
1 parent b1cd784 commit ae6e90d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/fullpage.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 3.0.7
2+
* fullPage 3.0.8
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -760,6 +760,7 @@
760760
//coming from closing a normalScrollElements modal or moving outside viewport?
761761
if(target == document || !target){
762762
setMouseHijack(true);
763+
options.scrollOverflowHandler.setIscroll(target, true);
763764
return;
764765
}
765766

@@ -788,6 +789,7 @@
788789
if(isNormalScrollTarget || isNormalScrollChildFocused){
789790
if(!FP.shared.isNormalScrollElement){
790791
setMouseHijack(false);
792+
options.scrollOverflowHandler.setIscroll(target, false);
791793
}
792794
FP.shared.isNormalScrollElement = true;
793795
isInsideOneNormalScroll = true;
@@ -798,6 +800,7 @@
798800
//not inside a single normal scroll element anymore?
799801
if(!isInsideOneNormalScroll && FP.shared.isNormalScrollElement){
800802
setMouseHijack(true);
803+
options.scrollOverflowHandler.setIscroll(target, true);
801804
FP.shared.isNormalScrollElement = false;
802805
}
803806
}

vendors/scrolloverflow.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,7 @@ if ( typeof module != 'undefined' && module.exports ) {
21392139

21402140

21412141
/*!
2142-
* Scrolloverflow 2.0.4 module for fullPage.js >= 3
2142+
* Scrolloverflow 2.0.5 module for fullPage.js >= 3
21432143
* https://github.com/alvarotrigo/fullPage.js
21442144
* @license MIT licensed
21452145
*
@@ -2397,6 +2397,16 @@ if ( typeof module != 'undefined' && module.exports ) {
23972397
});
23982398
},
23992399

2400+
// Enables or disables the whole iScroll feature based on the given parameter.
2401+
setIscroll: function(target, enable){
2402+
var scrollable = fp_utils.closest(target, SCROLLABLE_SEL) || $(SCROLLABLE_SEL, target)[0];
2403+
var action = enable ? 'enable' : 'disable';
2404+
2405+
if(scrollable){
2406+
scrollable.fp_iscrollInstance[action]();
2407+
}
2408+
},
2409+
24002410
/**
24012411
* Turns off iScroll for the destination section.
24022412
* When scrolling very fast on some trackpads (and Apple laptops) the inertial scrolling would

0 commit comments

Comments
 (0)
0