vpdchart / vpdchart-card

A VPD chart card for Home Assistant
https://vpdchart.com
MIT License
37 stars 7 forks source link

click issue when using vpd-chart and horizontal/vertical-stack card #7

Open sedado22 opened 5 months ago

sedado22 commented 5 months ago

Hello, first of all, thanks a lot for your hard work. I'm new to home assistant and i found this integration very helpful. im facing this issue, when i set this card and the horizontal/vertical stack card and click in a sensor to watch the history, then i cant click anything else in the screen unless i refresh the page. here is my dashboard.

`views:

Please tell me if i can give you further info or troubleshoot. thanks in advance

sedado22 commented 2 months ago

Hello. This logs are from the browser console:

content.js:448 Unable to check top-level optout: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "https://vpdchart.com" from accessing a cross-origin frame. checkPageOptout @ content.js:448 (anonymous) @ content.js:462 Show 2 more frames Show less content.js:448 Unable to check top-level optout: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "https://vpdchart.com" from accessing a cross-origin frame. checkPageOptout @ content.js:448 (anonymous) @ content.js:462 await in (anonymous) (async) (anonymous) @ content.js:532 (anonymous) @ content.js:534 Show 4 more frames Show less content.js:448 Unable to check top-level optout: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "https://vpdchart.com" from accessing a cross-origin frame. checkPageOptout @ content.js:448 (anonymous) @ content.js:462 await in (anonymous) (async) (anonymous) @ content.js:532 (anonymous) @ content.js:534 Show 4 more frames Show less

could it be related to ?: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

looking to the code, on line 57, looks like an iframe pointing to vpdchart.com https://github.com/vpdchart/vpdchart-card/blob/64f81b97ecbdf36e8fd5d096bf1158de51e22fd1/vpdchart-card.js#L57C1-L58C1

sorry if im posting something stupid... noob here

thanks in advance

derTim commented 3 weeks ago

@sedado22 I had the same issue, see #9 for a workaround.

sedado22 commented 3 weeks ago

@sedado22 I had the same issue, see #9 for a workaround.

Thanks a lot @derTim !! WA applied and so far working good!