alvarotrigo / alvarotrigo/fullPage.js

Active section changes too early in responsive mode

Abierto
#3,635 3 comentarios 2 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
JavaScript
Estrellas
35.4k
Forks
7.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Description

When using responsive mode, active section will change when next/prev section hits _about_ half the viewport height, causing callbacks to fire too early.

I'd expect the active section to change upon it hitting the top (if scrolling down), or bottom (if scrolling up) of the viewport.

### Link to isolated reproduction
[Fork of your setReponsive demo](https://codepen.io/deepfriedfilth/full/xemOMa)
You'll see I've added a lime background via CSS to `.section.active` and log `destination.index` + `window.pageYOffset` via `afterLoad` callback to pinpoint when active slide changes

### Steps to reproduce it
1. Set responsive mode to true
2. Scroll

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.