Support intersection/clipping detection in overlay positioning
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### What are you trying to do?
I am trying to set a position strategy that works when origin element is clipped. Is there any way to do this without writing a custom position strategy?
#### What troubleshooting steps have you tried?
I tried all the strategies available through CDK Api but without success.
#### Reproduction
https://stackblitz.com/edit/angular-rplbez
Basically, i have to 2 connected positions defined. First that will center the overlay below origin element and another one that will center the overlay above origin element. For example, if element is on the top of the page, overlay would go out of viewport and then second position will be used (below origin element). That works fine. But if origin element is clipped (as in stackblitz example) then overlay will be positioned using first position (above origin element).
Steps to reproduce:
1. Click on a blue square
2. Opened popover is over red header
#### Environment
- Angular: 10.0.9
- CDK/Material: 10.1.3
- Browser(s): Chrome 84.0
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS 10.15.3
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et examinez le comportement de positionnement de l’overlay CDK pour les deux positions connectées. Reproduisez le cas de l’origine rognée, puis vérifiez que la détection d’intersection ou de rognage sélectionne la position alternative tout en préservant le comportement de fallback existant du viewport.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100