You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Popover backdrop not included in production builds #24129
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v4.x
v5.x
v6.x
Current Behavior
In our Ionic React application, we are using the IonPopover component with the backdrop enabled.
When developing locally using npm run start, the popover opens and the backdrop is shown. Clicking outside of the popover closes it as expected.
However, when we deploy to our dev environment, the backdrop is not being shown, and the popover cannot be closed by clicking outside of it.
After some investigation, it appears that the IonBackdrop component is being marked as dead code during tree shaking, and not being included in the bundles created by npm run build.
Explicitly referencing the IonBackdrop somewhere in our code fixes the problem (i.e. console.log(IonBackdrop)).
Expected Behavior
After building and deploying the application, the backdrop should show and the user should be able to close the Popover by clicking outside of it.
Steps to Reproduce
Create a blank React Ionic v6 project
Add an IonButton and an IonPopover, with the button triggering the popover.
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.
Activity
fix(all): Ionic components that use child Ionic components are now co…
willmartian commentedon Nov 11, 2021
This issue has been resolved in #24191, and the fix will be available in Ionic v6.0.0-rc.3. Thanks for the bug report!
ionitron-bot commentedon Dec 11, 2021
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.