Overlay path covering element to highlight when outside of the initial window
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Inizia nell’implementazione di _getVisibleHeight() e traccia come il suo risultato viene usato per calcolare il percorso SVG dell’overlay. Riproduci un tour con un obiettivo evidenziato al di fuori della finestra iniziale, quindi verifica che lo scorrimento della finestra lasci l’obiettivo non coperto dall’overlay.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When an element to highlight is outside of the initial window (and needs to be scrolled to), the overlay covers this element.
It appears that the svg path of the overlay is calculated using _getVisibleHeight(), which returns 0 in that case.
This seems to be due to the fact that _getVisibleHeight() uses scrollParent.getBoundingClientRect(), without taking window.scrollY into account. The modification of _getVisibleHeight() as follow seems to resolve the issue :
if (scrollParent) {
const scrollRect = scrollParent.getBoundingClientRect();
const scrollTop = scrollRect.y || scrollRect.top;
const scrollBottom = scrollRect.bottom || scrollTop + scrollRect.height;
top = Math.max(top, window.scrollY + scrollTop);
bottom = Math.min(bottom, window.scrollY + scrollBottom);
}
- Lingua principale
- JavaScript
- Stelle
- 13.8k
- Fork
- 658
- Merge medio
- 7g 5h
- PR unite (30g)
- 18
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di shipshapecode/shepherd
-
Docs: rendering framework components as step content, and why DOM injection belongs in when.show Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
shipshapecode/shepherd#3479 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
shipshapecode/shepherd#3505 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
shipshapecode/shepherd#3484 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
shipshapecode/shepherd#3478 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
shipshapecode/shepherd#3442 · 1 commento · 2 reazioni ·
Tutte le issue di shipshapecode/shepherd
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Improve Title Support Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·