DisplayOnDevice, IsPhone(), IsTablet() and similar actions not working on first load

Hello,

We are using in our web app the "DisplayOnDevice" pattern and the "Is<Device>()" actions to show/hide elements according to the user's device. However, it seems like they are not working properly on the very first time the page is loaded.

For instance, we have a page that uses "DisplayOnDevice" to only show content on desktops, but that content is also rendered in phones on the first time that page is loaded. If I refresh the page, then everything starts working correctly.

I've created a simple eSpace reproducing this issue. You can access the application here. If you access it on your phone, you'll see the "This is a desktop" message. If you reload the page, you'll then see the "This is a phone" message, which is the correct one. If you clear your device's cache (cookies, cached files, etc) and reload the page, the problem happens again.

Is this a bug?

It seems to be a bug.

Would you raise a ticket on support page so Outsystems guys have a look at it?

Hi Aurelio,

Unfortunately I am unable to look into the OML right now.

Question: 

I presume the module is using a SilkUI/OutsystemsUI theme and the webscreen a SilkUI/OutsystemsUI layout?

This is needed for the DisplayOnDevice widget to work properly since it uses javascript from the layout.


Regards,

Nordin