fix: FLUX-595 - vl-datepicker - positionering calendar aangepast voor scroll correctie#729
Open
Goldflow wants to merge 1 commit intodevelop-v2from
Open
Conversation
b6e12eb to
f4de6e3
Compare
…API + CSS Anchor Positioning Vervangt de manuele getBoundingClientRect + scrollY/X berekening door native, evergreen browser API (Popover API & anchor()) voor robuustere kalender-positionering. Probleem: De oude positionering werkte niet bij scrollbare parent containers, overflow-clipping door ancestor-elementen, en transform-ancestors (zoals vl-modal met transform: translate(-50%, -50%)). Oplossing: - Popover API (popover="manual") voor top-layer rendering - CSS Anchor Positioning (anchor-name, position-anchor, anchor()) voor browser-native positionering - @position-try fallbacks voor smalle viewports en boven/onder flipping - position attribuut mapping (auto, above, below, etc.) via CSS
f4de6e3 to
805703c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://jira.omgeving.vlaanderen.be/jira/browse/FLUX-595
https://www.milieuinfo.be/bamboo/browse/FLUX-CFWC274 ✅
getBoundingClientRect() geeft coördinaten terug relatief ten opzichte van de viewport. Wanneer de pagina gescrolled is, blijven deze waarden relatief ten opzichte van de huidige viewport positie, zonder rekening te houden met de scroll offset.
De calendar placeholder werd dus verkeerd gepositioneerd wanneer de gebruiker gescrolled had, omdat de top/left waarden niet gecorrigeerd werden voor de scroll positie.
De fix voegt window.scrollY en window.scrollX toe aan de berekening, zodat de absolute positie correct berekend wordt ongeacht de scroll positie van de pagina.