thomasloven / hass-browser_mod

đŸ”¹ A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.33k stars 187 forks source link

Can not click out of popup on iOS app #617

Open Mariusthvdb opened 1 year ago

Mariusthvdb commented 1 year ago

My Home Assistant version: 0.XX.X

What I am doing: opening a markdown popup

What I expected to happen: have some way of clicking out of the popup

What happened instead:

cant click out, not even swipe in another view, can only completely swipe the app out of Phone, and reload

Minimal steps to reproduce:

# The least amount of code or steps possible to reproduce my error
hold_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
#      style: |
 #       --popup-border-radius: 0px;
 #       --popup-padding-x: 0px;
 #       --popup-padding-y: 0px;
 #       --dialog-backdrop-filter: blur(0.8em) brightness(1.2);
 #       --dialog-content-padding: 20px;
      content:
        type: markdown
# Put your code/steps here

Error messages from the browser console:

no errors

// Select everything from the browser console and copy it

// Paste it here

image

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

csudderth commented 1 year ago

I can confirm this is happening for me as well. It started happening after updating HomeAssistant to 2023.7.3.

tm24fan8 commented 1 year ago

Same for me after updating to 2023.7.3

In case it matters, this only happens on my iOS app on the phone...it works fine on my iPad.

Lux315 commented 1 year ago

Happens for me aswell. Even on IOS and Android

roderik-maker commented 1 year ago

A temporary and not optimal fix, is to install card_mod and add the following to your popup cards: (For IOS, haven't yet tested on android)

card_mod:
  style: |
    ha-dialog {
      --mdc-dialog-min-height: 10px !important;
    }

This returns the popups to a small size however, they are now at the bottom of the screen. I haven't yet figured out how to move them back up, but at least you don't have to quit the app to close a popup (This should help until a proper fix is implemented).

Example of full popup card:

type: custom:popup-card
title: Custom popup
dismissable: true
card:
  type: markdown
  content: This replaces the more-info dialog
right_button: right
left_button: left
entity: input_button.battery
card_mod:
  style: |
    ha-dialog {
      --mdc-dialog-min-height: 10px !important;
    }
YvesZH commented 1 year ago

+1 same problem

YvesZH commented 1 year ago
card_mod:
  style: |
    ha-dialog {
      --mdc-dialog-min-height: 10px !important;
    }

unfortunately does not work for ios

jbrandek commented 1 year ago

Ive bee able to fix it the problem is in browser_mod.js and browser_mod.js.gz on media querry 450px you should change it to this:

@media all and (max-width: 450px), all and (max-height: 500px) { ha-dialog { --mdc-dialog-min-width: 97vw; --mdc-dialog-max-width: 97vw; --mdc-dialog-min-height: 10%; --mdc-dialog-max-height: 100%; } then delete cache

i leave the files if someone does not know how to edit them, just delete the ones from custom_components/browser_mod/

and replace this 2

dont know how to edit in github if someone knows please upload them so they are kept in next update browser_mod.zip

ve1koz111 commented 1 year ago

@jbrandek I've tried this it does not fix it for IOS. Did this fix it for you?

jbrandek commented 1 year ago

@jbrandek I've tried this it does not fix it for IOS. Did this fix it for you?

Did you wipe the cache?

ve1koz111 commented 1 year ago

Yes multiple times.

I've found a way to fix it on PC and mobile (when you inspect element and change to mobile) but unfortunately this does not fix my issue on IOS, even though I've deleted frontend cache multiple times.

https://github.com/ve1koz111/hass-browser_mod

jbrandek commented 1 year ago

Starnge, it fixes for me but im an android user, didnt try on iphone, dont know witch querry it uses... but try the full screen one the one that is before de 450px to see if that fixes it

ve1koz111 commented 1 year ago

@jbrandek

https://github.com/thomasloven/hass-browser_mod/compare/master...ve1koz111:hass-browser_mod:master

I've changed everything possible

jbrandek commented 1 year ago

@jbrandek

https://github.com/thomasloven/hass-browser_mod/compare/master...ve1koz111:hass-browser_mod:master

I've changed everything possible

You also changed the js.gz one?

ve1koz111 commented 1 year ago

I thought that’s created when it’s downloaded by HACS it’s not part of the code? Where can I find the compressed files?

jbrandek commented 1 year ago

I thought that’s created when it’s downloaded by HACS it’s not part of the code? Where can I find the compressed files?-- Mina Saweris

I upload them, you can compress the js wit an online gz compress tool i find it in google... try with the files i sent in the first message

Alex-joomla commented 1 year ago

Same problem for me, iOS 16.6, @roderik-maker s workaround didn't help

ve1koz111 commented 1 year ago

I've fixed this and confirmed it on my own ios 16.6 HA 2023.8.2

Add https://github.com/ve1koz111/hass-browser_mod as a custom repository.

Uninstall old browser mod 'ignoring' entities, and reinstall from this repository until a proper fix is made.

YOU MUST RESET FRONTEND CACHE ON YOUR DEVICE FOR THIS TO WORK.

If rounded corners are not working for you add this to your CSS:

--ha-dialog-border-radius: var(--popup-border-radius, 28px);

@Alex-joomla @jbrandek

Simonh98 commented 1 year ago

I've fixed this and confirmed it on my own ios 16.6 HA 2023.8.2

Add https://github.com/ve1koz111/hass-browser_mod as a custom repository.

Uninstall old browser mod 'ignoring' entities, and reinstall from this repository until a proper fix is made.

YOU MUST RESET FRONTEND CACHE ON YOUR DEVICE FOR THIS TO WORK.

If rounded corners are not working for you add this to your CSS:

--ha-dialog-border-radius: var(--popup-border-radius, 28px);

@Alex-joomla @jbrandek

Worked for me. Thanks!

Alex-joomla commented 1 year ago

@ve1koz111 tried but no effect (cleared cache):

IMG_2305

ve1koz111 commented 1 year ago

@Alex-joomla

Please let me know of the steps you followed to install this version

Thanks

Alex-joomla commented 1 year ago

Than you for your quick reply, i went to HACS, deinstalled the original browser-mod (hit ignore), then added your repo and installed it. Then I cleared my browser cache on my iPhone (Debug Menu)

Alex-joomla commented 1 year ago

Now it works, I did nothing else :-)

Thank you, you saved our i Home :-)

tm24fan8 commented 1 year ago

I've fixed this and confirmed it on my own ios 16.6 HA 2023.8.2

Add https://github.com/ve1koz111/hass-browser_mod as a custom repository.

Uninstall old browser mod 'ignoring' entities, and reinstall from this repository until a proper fix is made.

YOU MUST RESET FRONTEND CACHE ON YOUR DEVICE FOR THIS TO WORK.

If rounded corners are not working for you add this to your CSS:

--ha-dialog-border-radius: var(--popup-border-radius, 28px);

@Alex-joomla @jbrandek

Works for me. Appreciate it!

danielducu commented 1 year ago

31 October and no fix for this, I wonder if this project is still on. Should we look for alternatives ?

se7entynine commented 9 months ago

Hey, I still have the same problem on my android app, but unfortunatly I can't add your repository as it isn't structure v5.0 complaint.

Error message: <Plugin ve1koz111/hass-browser_mod> Repository structure for v5.0 is not compliant

danielducu commented 9 months ago

Hey, I still have the same problem on my android app, but unfortunatly I can't add your repository as it isn't structure v5.0 complaint.

Error message: <Plugin ve1koz111/hass-browser_mod> Repository structure for v5.0 is not compliant

This project has fallen into the void unfortunately. Check out bubble card , it's flawless.

bkbartk commented 9 months ago

for me it stopped working recently, not since half a year, but it also doesn't work on my browser on IOS. so maybe It's an IOS(webkit) issue?