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

Warning Messages in Chrome Browser #148

Closed
vowill opened this issue May 22, 2022 · 3 comments
Closed

Warning Messages in Chrome Browser #148

vowill opened this issue May 22, 2022 · 3 comments

Comments

@vowill
Copy link

vowill commented May 22, 2022

First of all: Thank you, @foxriver76 , for providing this great adapter! It's the most used one on my tablet placed in the kitchen - and works more reliable than the Alexa interface :-)

Here comes an issue with the latest Google Chrome Browser (which is used by fully kiosk browser as well):

  1. Opening a vis page with the bring widget, the development tool coming with Chrome browser shows multiple warnings (one for each item, here as example for a shopping item "Hefezopf"):
    "Bring[w00499]: Cannot resize text for item w00499-Hefezopf: Error: Set a static height and width on the target element

    Hefezopf
    before using textFit!
    checkRecentItems @ index.html?smarthome-DG:3763"

  2. When trying to enter a new shopping item via the headline of the bring widget, the browser starts the default page of vis a soon as the tablet keyboard opens. This ist true for Android 9 and Android 10; however the tablet keyboard opens correctly and an item can be inserted in earlier Android versions (5, 6 and 7)

Versions:

  • Adapter version: 1.7.13 (2022-02-05)
  • JS-Controller version: 5.2.21
  • Node version: v12.22.7
  • Operating system: Android (se above)
@foxriver76
Copy link
Owner

Unfortunately I am not able to replicate one of these problems. The width and height of the resize text divs is actually set code-wise. And on my Teclast 20 HD with up-to-date Fully Browser + Android 10 the widget works fine. Are you able to get logs of the problem on the Android device.

Regarding the first problem, are there any texts which are larger than the actual box?

@vowill
Copy link
Author

vowill commented May 23, 2022

for 1.: There are further messages in the console which may indicate an issue (I'm not too familiar with that, sorry), e. g.

  • 12:18:13 Bring[w00389]: Render Widget - index.html?smarthome-DG:3774
  • 12:18:13 Bring[w00389]: Registered Event Handlers - index.html?smarthome-DG:3790
  • Trying to get states again, because emitted getStates still pending - conn.js:787

The last line appears for all widgets linked to my "Bring"-page in vis.

Regarding the warning message mentioned in my issue, some of the text got lost. Here it comes again (I enclosed the critical characters by '):

"Cannot resize text for item w00499-Hefezopf: Error: Set a static height and width on the target element '<'div class="item-name" style="height: calc(0.2013 * 150px);margin-top: calc(-0.0431 * 150px;"'>'Hefezopf'<'/div'>' before using textFit!"

I guess the issue comes from the negative number in the "margin-top" calculation?

@vowill vowill closed this as completed May 23, 2022
@vowill
Copy link
Author

vowill commented Jun 9, 2022

Here comes the reason (and solution) for my issue 2 (see above: "...the browser starts the default page of vis a soon as the tablet keyboard opens"):
As reported in the ioBroker forum by user 'Wildbill' (see https://forum.iobroker.net/topic/19950/probleme-fully-browser-und-vis-app-android/5), any view marked as "default" is automatically called by Android webview (i. e. Google Chrome or Fully Browser) as soon as the keyboard opens. You need to untick the "default" box in all views, then the issue is gone.

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

2 participants