Skip to content
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

Custom_fields with a card inside is not clickable #874

Open
2 tasks done
shahrukh0104 opened this issue Oct 10, 2024 · 0 comments
Open
2 tasks done

Custom_fields with a card inside is not clickable #874

shahrukh0104 opened this issue Oct 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shahrukh0104
Copy link

shahrukh0104 commented Oct 10, 2024

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser

Describe the bug
I wrapped a non-clickable card in a custom:button-card with custom_fields to be able to use the tap_action so that the card is clickable. The part of the button-card that has the child card becomes non clickable. That works against its purpose, if a whole card is supposed to be a clickable button. Basically, the non-clickable card, stays non-clickable even wrapped in a button-card.

I tried doing it with a simpler non-clickable card just to be sure that it is not the card that is the problem. But this too does not work. The code below is with the simpler non-clickable card.

Ah yes, with styling does not work at all.
Without styling card, it works on the parts where the title-card does not cover the button card, but I want the whole button to be clickable.

Version of the card
Version: 4.1.2

To Reproduce
This is the configuration I used:

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - condition: state
        entity: input_select.toogle_entur_views
        state: Set 1
    card:
      type: custom:button-card
      tap_action:
        action: call-service
        service: input_select.select_option
        service_data:
          entity_id: input_select.toogle_entur_views
          option: Set 2
      custom_fields:
        my_card1:
          card:
            type: custom:mushroom-title-card
            title: Hello, there !
      styles:
        card:
          - position: relative 
          - height: 100px
          - width: 460px
        custom_fields:
          my_card1: 
             - position: absolute
             - z-index: 1
             - top: 0
             - left: 0
             - right: 0
             - bottom: 0
  - type: conditional
    conditions:
      - condition: state
        entity: input_select.toogle_entur_views
        state: Set 2
    card:
      type: custom:button-card
      tap_action:
        action: call-service
        service: input_select.select_option
        service_data:
          entity_id: input_select.toogle_entur_views
          option: Set 1
      custom_fields:
        my_card:
          card:
            type: custom:mushroom-title-card
            title: Hello, back!

Additional context
Add any other context about the problem here.

@shahrukh0104 shahrukh0104 added the bug Something isn't working label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant