Premium support for our pure JavaScript UI components


Post by rakshith.snps »

Hi, I'd quickly like to confirm about v5.6.6

My LWC components api version is 58.
The Current salesforce version is 60.(Lightning Locker)

When I use my lwc component which works with bryntum 5.6.6 version.

There is a error that comes up because a certain defaultView value is undefined.

bryntum error.gif
bryntum error.gif (424 KiB) Viewed 378 times

Although I don't know the original cause of the bug, When I upgraded my salesforce version to v60 this error stopped showing up.

The problem occurs in some of our sandboxes and it doesn't occur in others.

I'd like to know this approach is correct ? (because I'm unsure of the scope of influence when I upgrade the api version so I want to validate this approach first)

Could you please tell us what might be causing this problem ?


Post by Maxim Gorkovsky »

Hello.

I'd like to know this approach is correct ? (because I'm unsure of the scope of influence when I upgrade the api version so I want to validate this approach first)

In general, we recommend sticking to latest version. I would expect same principle to apply to Salesforce API version too.

Could you please tell us what might be causing this problem ?

It looks like viewport.ownerDocument is undefined. It happens in a part of code that works for both LWS and Locker. You can try investigating this problem to see what is viewport element and why it doesn't have ownerDocument. We are not going to look into the problem because you got rid of it on your end by upgrading to latest API.


Post by alex.l »

Hi,

Please review the patch from this thread. That might help you with your problem viewtopic.php?p=141588#p141588

All the best,
Alex


Post by rakshith.snps »

Alex and gbrdhvndi, Thank you the patch worked and we were able to stop the error from happening.

This question might be out of the context, How were you able to find the cause. (How did you debug)

We use minified js files and not knowing the full context. I was able to understand that the null check was failing.

But thats about how far i was able to go. I didnt know how to debug more deeply.

But it would be helpful for us in the future if you could share how to handle such a situation.

Any tips are welcome. Thank you


Post by alex.l »

Hi,

Do you know about debug mode in LWC?

All the best,
Alex


Post by rakshith.snps »

Hi, Yes I used that to understand that some part viewport is undefined.


Post by alex.l »

Actually, that and use not minified sources of the Bryntum lib, that's all we can do with it :)

All the best,
Alex


Post Reply