Page 2 of 2

Re: Height and width of div element getting set to zero randomly

Posted: Thu Jan 07, 2021 5:09 pm
by matt.denninghoff
We thought of an alternative to using the mobile-device-layout CSS class in addition to your class:
If you're using your own mobile client (not the Profound UI mobile app), then your start HTML could include a <link rel="stylesheet" href="yourCustomStyles.css"> tag to the CSS that your mobile layout uses. That way, the CSS file is loaded before Profound starts rendering in the document body's "onload" event.

Also, we've added support in all mobile apps to automatically request .js and .css files in userdata/extension/mobile/ before rendering the page. Currently, the code waits for JS files to load before rendering but does not wait for CSS files to load--those are only requested and may not download in time. userdata/extension/mobile is meant to avoid adding entries to the "external css" property of every screen. Read more here: https://docs.profoundlogic.com/x/doD2Ag

Re: Height and width of div element getting set to zero randomly

Posted: Sat May 06, 2023 4:03 am
by Aliya77
Theju112 wrote: Thu Sep 03, 2020 9:14 pm Hi Scott,

Timing issue is the most probable reason as loading the screen a number of times solves this issue for the rest of the logged in session.

The app is created using phonegap and designer for the screens. I don't think we are using profound mobile

When you say start up code, can you please let me know which js and HTML file you are referring to?

Is it runtime.js?

Also we are using a custom css class for the main layout. Earlier, it was mobile-device-layout. We changed it to give the screen the ash and black theme in the screenshot. This was when the issue started happening.

But the custom css class is just a copy of mobile-device-layout with just the color codes changed. Not sure if this would impact any way.

Also for the moment, do you have any workarounds in your mind to solve this issue?

I mean the code I added in the on load property is not suitable because it's using hard coded pixel values.

Is there any other approach we can follow for now to assign the correct height and width without having to "hardcode" pixel values.

Thanks,
Thejwal
Hi

It sounds like there may be a timing issue causing the screen to not load properly.Free Fire