OverlayPanel target arrow points to the wrong position when target is on the right edge of the screen #9441
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
FIXED IN: #9442
I'm submitting a ... (check one with "x")
StackBlitz Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewed in detail and assisted.
https://stackblitz.com/edit/primeng-overlaypanel-demo-tqua3z?file=src/styles.css
Current behavior
The OverlayPanel component's arrow points to the wrong place if the target is up against the edge of the right side of the screen. There is code to handle this in the align() method:
primeng/src/app/components/overlaypanel/overlaypanel.ts
Lines 187 to 199 in a8551d4
The CSS looks to have (unintentionally?) been removed during the migration to PrimeOne (the switch from .ui- to .p- prefixes for class names) in this commit here: c7dd064#diff-4166dfa8da6660ec4e195e891b761a9ce8f5e49db19ace3613ac9d66ad8e4f94L56
Expected behavior

The arrow should be shifted to the other side of the panel to point to the target if it is against the right edge of the screen.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/primeng-overlaypanel-demo-tqua3z?file=src/styles.css
What is the motivation / use case for changing the behavior?
I want the arrow to point to the right place 🙂
Please tell us about your environment: Windows, Webstorm/Visual Studio Code/Intellij, Node, WebSphere
Angular version: ^10.0.0
PrimeNG version: ^10.0.0
Browser: All
Language: All
Node (for AoT issues):
node --version
= N/AThe text was updated successfully, but these errors were encountered: