thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

fold-entity-row not displayed properly on iPhone #198

Closed ildar170975 closed 2 years ago

ildar170975 commented 2 years ago

My Home Assistant version: 2021.11.5

Fold-entity-row version (FROM BROWSER CONSOLE): 2.0.12

What I am doing: Open a page on iPhone 5S (12.5.5).

What I expected to happen: The fold-entity-row is displayed as well as other cards on the page.

What happened instead: The card is not displayed properly. Other cards on the page are not displayed at all. изображение

Minimal steps to reproduce:

  1. Create a view.

  2. Place this card on the view as the 1st card:

    type: entities
    entities:
    - type: custom:fold-entity-row
    open: false
    padding: 0
    head:
      entity: input_boolean.test_boolean
    entities:
      - entity: sun.sun
      - entity: sun.sun
      - entity: sun.sun

    Picture from a PC: изображение

  3. Place other cards on the view.

Error messages from the browser console: no messages related to the card.


By putting an X in the boxes ([X]) below, I indicate that I:

ildar170975 commented 2 years ago

Have to admit that ALL fold-entity-row (not only with toggles) are displayed in a wrong way (like it was described in the 1st post) sometimes. Sometimes I can fix it by erasing a cache, it helps but not always.

antsar commented 2 years ago

I believe I'm seeing this same issue on an iPad Air 1 running iOS 12.5.5, using fold-entity-row 20.0.12 on Home Assistant 2021.12.10. It happens in both the Home Assistant app, and in Safari. I believe the fold-entity-row may have loaded correctly once or twice after a huge delay (or possibly a reload), but I can't get it to work consistently.

Attaching Web Inspector to Safari on the iPad turns up the following errors.

(2x) [Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: ResizeObserver - fold-entity-row.js:931 [Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: ResizeObserver - fold-entity-row.js:276 [Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: ResizeObserver - fold-entity-row.js:931

The same configuration works perfectly on desktop browsers, as well as an iPad Pro running iOS 15.1. The newer iPad also does not produce those ReferenceErrors in the log.

Happy to troubleshoot further if anyone has pointers.

thomasloven commented 2 years ago

Should be fixed in 20.0.13