hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Issues/unexpected behaviour when triggering popup within popup

Open adabelleleiram opened this issue 2 years ago • 9 comments

My Home Assistant version: 2023.1.0

What I am doing: I would like to be able to open a popup from within another popup. In my case, I have a light group that I want to be able to expand. For the hold action of the light group, I trigger a popup that shows a list of all the entities in that group. Holding on each entity brings up another popup. If that entity is a group, it would expand that one too, otherwise show more-info for that light.

What I expected to happen: To be able to open each popup with a hold action. When I close each popup, I expect to return to the previous popup.

What happened instead: On mobile (both companion app and Chrome), I have to do the hold action twice within the first popup to open the second popup: https://user-images.githubusercontent.com/28298971/213862640-7cf5c40c-ff9f-4d5a-b139-38b6d72af636.mp4

This doesn't happen on my computer in Chrome (not even with mobile layout in dev tools).

When I close popup 2, I'm sent back to the main view. This happens on mobile and on my computer.

Minimal steps to reproduce:

  • Use the yaml below.
  • Hold button card to open popup 1
  • Hold button card ** On computer browser: opens popup 2 ** On mobile (companion or browser): hold again to open popup 2
  • Close popup
# The least amount of code or steps possible to reproduce my error
type: button
entity: light.dining_room_light
hold_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Popup 1
      content:
        type: horizontal-stack
        cards:
          - type: button
            entity: light.dining_room_pendant_up
            hold_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Popup 2
                  content:
                    type: custom:more-info-card
                    title: "Popup 2"
                    entity: light.dining_room_pendant_up

# Put your code/steps here

Error messages from the browser console: Nothing on computer. Can't check on mobile...?

// Select everything from the browser console and copy it

// Paste it here

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

  • [X] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • [X] Have made sure I am using the latest version of the plugin.

  • [X] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • [X] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

adabelleleiram avatar Jan 21 '23 10:01 adabelleleiram

I've added a media-control card to a popup and noticed the Browse Media button doesn't work. I think that's essentially the same issue - popup from within a popup.

jherby2k avatar Feb 02 '23 21:02 jherby2k

Have similar issue with scheduler card, where it is normally possible to click on the title/status line to open the schedule as popup. But if the scheduler card opened via a browser-mod popup it is no longer possible to open the schedule popup.

Kilill avatar Feb 25 '23 15:02 Kilill

Same issue here @Kilill .... @thomasloven any idea ?

jr-k avatar Mar 03 '23 21:03 jr-k

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 22 '23 01:05 stale[bot]

I assume this hasn't been fixed..? Commenting so this doesn't get closed

adabelleleiram avatar May 22 '23 04:05 adabelleleiram

Please try now.

thomasloven avatar Jul 14 '23 23:07 thomasloven

Please try now.

Great to hear that you've fixed it! I unfortunately can't test it at the moment due to this issue: https://github.com/thomasloven/lovelace-more-info-card/issues/23

If you have a chance to look at that one too at some point, I can verify them both :)

adabelleleiram avatar Jul 19 '23 12:07 adabelleleiram

Thomas, I am having the same issue here. 'parent' popup is closed when firing popup from it.

deadlypantsd avatar Sep 25 '23 07:09 deadlypantsd

Hi @thomasloven ,

Sorry it took me so long but I've finally given it a try. I'm unfortunately still having the same issue (I open two "nested" popups, clicking back does nothing, clicking backing again takes me to the start). It's like it doesn't close the second popup (maybe it closes the first one underneath the second popup so I don't see anything happen...?).

adabelleleiram avatar Dec 14 '23 09:12 adabelleleiram