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: ion-backdrop not dismissing when visible property set to false #26953
Ok, thanks for looking at this; perhaps I'm misunderstanding the intended behavior of the component.
But, even with the Basic Usage example from the documentation , looking at the StackBlitz, I'm still unable to interact with the button or the checkbox control unless I completely remove the <ion-backdrop [visible]="false"></ion-backdrop> tag from the page. Setting [visible]="false" does not allow me to interact with the button or the checkbox.
I expected that if I set the [visible]="false" I would be able to interact with the page elements.
On further investigation, it looks like the visible property was mostly created for internal use, to enable the showBackdrop property on ion-modal: https://ionicframework.com/docs/api/modal#showbackdrop All setting visible="false" does is make the backdrop invisible, but have it still prevent interaction with other elements. If you would like to be able to interact with the page elements, I would recommend setting display: none on the backdrop through CSS, or not rendering the backdrop at all.
I'm going to close this issue as the visible property is working as intended. However, we're going to investigate internally on whether it would be better to remove the prop entirely in a future release, as it's possible that we don't need it as a public API. Thank you again for raising this issue.
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
averyrousseau commentedon Mar 14, 2023
Thank you for the issue. Just to make sure I understand, do you mean that the blue backdrop remains visible even with
visible="false"?If so, this is due to the following CSS in that playground, in
example.component.css:This overrides the CSS that hides the backdrop when the
visibleproperty is set. If I remove that CSS, the backdrop disappears.timstoute commentedon Mar 14, 2023
Ok, thanks for looking at this; perhaps I'm misunderstanding the intended behavior of the component.
But, even with the Basic Usage example from the documentation , looking at the StackBlitz, I'm still unable to interact with the button or the checkbox control unless I completely remove the
<ion-backdrop [visible]="false"></ion-backdrop>tag from the page. Setting [visible]="false" does not allow me to interact with the button or the checkbox.I expected that if I set the [visible]="false" I would be able to interact with the page elements.
averyrousseau commentedon Mar 15, 2023
On further investigation, it looks like the
visibleproperty was mostly created for internal use, to enable theshowBackdropproperty onion-modal: https://ionicframework.com/docs/api/modal#showbackdrop All settingvisible="false"does is make the backdrop invisible, but have it still prevent interaction with other elements. If you would like to be able to interact with the page elements, I would recommend settingdisplay: noneon the backdrop through CSS, or not rendering the backdrop at all.I'm going to close this issue as the
visibleproperty is working as intended. However, we're going to investigate internally on whether it would be better to remove the prop entirely in a future release, as it's possible that we don't need it as a public API. Thank you again for raising this issue.ionitron-bot commentedon Apr 14, 2023
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.