Skip to content

bug: ion-backdrop visible=false not working #29177

Closed as not planned
Closed as not planned

Description

@Sovai

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

ionic vue when set visible=false it still show up.

Expected Behavior

this should hide the backdrop

Steps to Reproduce

Code Reproduction URL

https://stackblitz.com/edit/m3udbc?file=src%2Fcomponents%2FExample.vue

Ionic Info

I am using "@ionic/vue": "^7.7.3"

Additional Information

No response

Activity

  1. liamdebeasi commented on Mar 19, 2024

    @liamdebeasi
    Contributor

    Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. The background CSS in your example is overriding the code we set to clear the backdrop opacity.

    The visible property sets the background color of the backdrop to transparent but still receives click events. As a result, we do not hide it using display: none.

    We set a .backdrop-hide class on the host element that sets background-color: transparent. However, since your CSS takes priority the transparent background is not taking effect.

    You can fix this by changing your selector to ion-backdrop:not(.backdrop-hide).

  2. ionitron-bot commented on Apr 18, 2024

    @ionitron-bot

    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.

  3. locked and limited conversation to collaborators on Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions