New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: inline popover positioned wrong with auto width #24716
Comments
@EinfachHans thanks for reporting this issue! I'm seeing the same issues as you, in your example. The The arrow appears in the DOM, but is not visual. Manually modifying the positioning, I can get the arrow to become visible. In the interim, we'll track these bugs together, as the arrow positioning may be affected by the main issue. |
This is really annoying in our app atm^^ Is this included in one of your next sprints @sean-perkins ? |
As a workaround, applying The issue here appears to be that without that option enabled, when the inline overlay is presented in Angular, the present logic calculates the positioning of the popover before the inner contents actually render. e.g.: <ng-container [ngTemplateOutlet]="template" *ngIf="isCmpOpen || keepContentsMounted"></ng-container> The template does not actually render until
|
@EinfachHans can you test with this dev-build and let me know if you run into any issues? npm install @ionic/angular@6.2.10-dev.11664565192.13ca046d |
@sean-perkins looks good 😃👍🏼 |
@sean-perkins Can you include you fix into the next version? |
This issue has been resolved and will be available in the |
@sean-perkins it's not really working with the nightly build as is did with the dev build:
|
@EinfachHans can you update your reproduction app (or create a new branch/reproduction) that can reproduce what you are experiencing? The merged fix is different than the proposed dev-build, to avoid changes to a public API (would push the resolution out to 6.4.0). We opted for a different approach that would allow the fix to ship in a patch release. With the If you can get me a sample of where it fails, I can take a look! |
Hey @sean-perkins , check out this repo: https://github.com/EinfachHans/ionic-popover-arrow-bug I opened it for #25142 which was closed as an duplicate of this issue. There i don't use an inline popover but an popover via controller which should be correctly positioned as well of course
|
Interesting 🤔 that is another difference between the dev-build vs. the proposed fix. The dev-build targeted code that applied to all presentation types (controller, inline), where as the proposed fix strictly targets inline. This is my bad, I had assumed based on the reproduction that this was isolated to inline & tried to isolate the affected code to as narrow of a scenario as possible. Let me get a dev-build of that check removed and test it against the other reproduction. If it works, I'll additionally post it here for you to test with. |
Ok, looks like removing that extra check works for both controller and inline popovers. Can you test with dev-build:
Let me know if you observe the same. |
Yes i do, looks good 👍🏼 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
I have an inline Popover with either
--width: fit-content
or--width: auto
. This causes the positioning to be wrong and the popover is out of the screen.Expected Behavior
The Positioning should be the same if inline or not. Also the arrow is not displayed 8for both), why is that?
Steps to Reproduce
See linked Repo. The Popovers have the same content but only the inline one is positioned wrong
Code Reproduction URL
https://github.com/EinfachHans/ionic-popover-issue
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (/Users/hanskrywalsky/.nvm/versions/node/v14.17.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.5
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.4.0
@capacitor/android : not installed
@capacitor/core : 3.4.0
@capacitor/ios : not installed
Utility:
cordova-res (update available: 0.15.4) : 0.15.1
native-run : 1.5.0
System:
NodeJS : v14.17.0 (/Users/hanskrywalsky/.nvm/versions/node/v14.17.0/bin/node)
npm : 6.14.13
OS : macOS Monterey
Additional Information
No response
The text was updated successfully, but these errors were encountered: