Height and width of div element getting set to zero randomly

Use this board for starting discussions, asking questions, and giving advice on Web programming for the IBM i platform (and predecessors.)
User avatar
matt.denninghoff
Profound Logic Staff Member
Posts: 115
Joined: Wed Feb 10, 2016 3:53 pm
First Name: Matthew
Last Name: Denninghoff
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

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

Post 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
Aliya77
New User
Posts: 1
Joined: Sat May 06, 2023 3:59 am
First Name: Aliya77
Last Name: Khan
Company Name: google
Phone: 9635973970
Address 1: kolkata
Address 2: kolkata
City: kolkata
State / Province: West Virginia
Zip / Postal Code: 740258
Country: India
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests