|
1 | 1 | /*! |
2 | | -* fullPage 4.0.22 |
| 2 | +* fullPage 4.0.23 |
3 | 3 | * https://github.com/alvarotrigo/fullPage.js |
4 | 4 | * |
5 | 5 | * @license GPLv3 for open source use only |
|
2797 | 2797 | if (!getState().activeSection && section.isVisible) { |
2798 | 2798 | addClass(sectionElem, ACTIVE); |
2799 | 2799 | updateState(); |
| 2800 | + } |
| 2801 | + |
| 2802 | + if (!startingSection && section.isVisible) { |
2800 | 2803 | startingSection = getState().activeSection.item; |
2801 | 2804 | } |
2802 | 2805 |
|
|
2926 | 2929 | // to avoid issue #4484 & #4493 on Safari |
2927 | 2930 |
|
2928 | 2931 | requestAnimationFrame(function () { |
2929 | | - scrollableItem.focus(); |
| 2932 | + scrollableItem.focus({ |
| 2933 | + preventScroll: true |
| 2934 | + }); |
2930 | 2935 | scrollOverflowHandler.isInnerScrollAllowed = true; |
2931 | 2936 | }); |
2932 | 2937 | } |
|
4670 | 4675 |
|
4671 | 4676 |
|
4672 | 4677 | scrollings.push(Math.abs(value)); //preventing to scroll the site on mouse wheel when scrollbar is present |
| 4678 | + //and preventing scroll of parent frames |
4673 | 4679 |
|
4674 | | - if (getOptions().scrollBar) { |
4675 | | - preventDefault(e); |
4676 | | - } //time difference between the last scroll and the current one |
4677 | | - |
| 4680 | + preventDefault(e); //time difference between the last scroll and the current one |
4678 | 4681 |
|
4679 | 4682 | var timeDiff = curTime - prevTime; |
4680 | 4683 | prevTime = curTime; //haven't they scrolled in a while? |
|
5145 | 5148 | var target = params.target; |
5146 | 5149 |
|
5147 | 5150 | if (closest(target, getOptions().menu + ' [data-menuanchor]')) { |
5148 | | - menuItemsHandler.call(target, params); |
| 5151 | + menuItemsHandler.call(target, params.e); |
5149 | 5152 | } |
5150 | 5153 | } //Menu item handler when not using anchors or using lockAnchors:true |
5151 | 5154 |
|
|
5157 | 5160 |
|
5158 | 5161 | if ($(getOptions().menu)[0] && (getOptions().lockAnchors || !getOptions().anchors.length)) { |
5159 | 5162 | preventDefault(e); |
| 5163 | + var menuAnchorEl = closest(this, '[data-menuanchor]'); |
5160 | 5164 | /*jshint validthis:true */ |
5161 | 5165 |
|
5162 | 5166 | EventEmitter.emit(events.onMenuClick, { |
5163 | | - anchor: getAttr(this, 'data-menuanchor') |
| 5167 | + anchor: getAttr(menuAnchorEl, 'data-menuanchor') |
5164 | 5168 | }); |
5165 | 5169 | } |
5166 | 5170 | } |
|
5486 | 5490 | }); |
5487 | 5491 | }); |
5488 | 5492 | var t = ["-"]; |
5489 | | - var n = "\x32\x30\x32\x34\x2d\x30\x2d\x33\x31".split("-"), |
| 5493 | + var n = "\x32\x30\x32\x34\x2d\x35\x2d\x32\x30".split("-"), |
5490 | 5494 | e = new Date(n[0], n[1], n[2]), |
5491 | 5495 | r = ["se", "licen", "-", "v3", "l", "gp"]; |
5492 | 5496 |
|
|
5505 | 5509 | }(); |
5506 | 5510 |
|
5507 | 5511 | //@ts-check |
| 5512 | + EventEmitter.on(events.beforeInit, beforeInit); |
5508 | 5513 | FP.setKeyboardScrolling = setKeyboardScrolling; |
| 5514 | + |
| 5515 | + function beforeInit() { |
| 5516 | + setKeyboardScrolling(true); |
| 5517 | + } |
5509 | 5518 | /** |
5510 | 5519 | * Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys |
5511 | 5520 | */ |
5512 | 5521 |
|
| 5522 | + |
5513 | 5523 | function setKeyboardScrolling(value, directions) { |
5514 | 5524 | if (typeof directions !== 'undefined') { |
5515 | 5525 | directions = directions.replace(/ /g, '').split(','); |
|
5916 | 5926 | }; //public functions |
5917 | 5927 |
|
5918 | 5928 |
|
5919 | | - FP.version = '4.0.22'; |
| 5929 | + FP.version = '4.0.23'; |
5920 | 5930 | FP.test = Object.assign(FP.test, { |
5921 | 5931 | top: '0px', |
5922 | 5932 | translate3d: 'translate3d(0px, 0px, 0px)', |
|
0 commit comments