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

Map in popup doesn't work on first load #344

Closed
4 tasks done
IDmedia opened this issue Jul 21, 2022 · 7 comments
Closed
4 tasks done

Map in popup doesn't work on first load #344

IDmedia opened this issue Jul 21, 2022 · 7 comments

Comments

@IDmedia
Copy link

IDmedia commented Jul 21, 2022

My Home Assistant version: 2022.6.7

What I am doing:
Trying to use a map-card in a popup in order to show a users location

What I expected to happen:
The popup to open and the map to be displayed inside the popup

What happened instead:
The popup is blank when initially opened (the map-card isn't loaded). Closing the popup and triggering the event once more (without reloading the page) shows the map as intended. Reloading the page breaks it and requires the user to close the popup at least once in order for the map to be displayed.

Minimal steps to reproduce:
Add a tap_action to anything and use the following snippet:

        tap_action:
          action: fire-dom-event
          browser_mod:
            command: popup
            title: 'User Location'
            card:
              type: map
              entities:
                - person.doctor_who

Error messages from the browser console:
No errors are logged. The popup's div is just blank


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

@Daniel-dev22
Copy link

Seeing the same behavior.

@IDmedia
Copy link
Author

IDmedia commented Aug 13, 2022

I've tried rewriting this as a script with a repeat function so the script triggered twice. Couldn't figure out how to run the tap_action code twice otherwise. It would have been a workaround, but unfortunately the map then popups on every device and not just the one you initiate the popup from. Haven't found any way around it yet. I doubt there is now that the deviceID parameter is deprecated. Would love some help getting this fixed in a proper way.

@thomasloven
Copy link
Owner

Closed because of Browser Mod 2.0 release.
Please see #354.

@IDmedia
Copy link
Author

IDmedia commented Sep 4, 2022

This issue still persists with 2.0

@Shamshala
Copy link

This issue still persists with 2.0

Oh no, you crushed my hopes. 😢

@joshward9182
Copy link

This issue is closed but I appear to be having the same problem, using Browser Mod v2.1.3.

Is it fixed for a y of the commenters on this thread?
Is there anything else I should try?

@Daniel-dev22
Copy link

This issue is closed but I appear to be having the same problem, using Browser Mod v2.1.3.

Is it fixed for a y of the commenters on this thread? Is there anything else I should try?

The map itself takes too long to load so browser mod loads the popup instead of waiting to load. The second time it works because it's coming from cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants