support icon indicating copy to clipboard operation
support copied to clipboard

[SALESFORCE] TaskBoard ResponsiveCards mixin does not work in LWS

Open chuckn0rris opened this issue 5 months ago • 0 comments

Forum post

Hello!

The responsive cards feature relies on the ResizeObserver, which is not available in the Locker service.

Screenshot 2024-10-02 at 02.11.28.png

The ResponsiveCardOverride addresses this by emptying the changeResizeObserver method. However, this override is applied unconditionally, which also affects LWS environment where the ResizeObserver is working just fine.

I implemented the "Zooming" demo in a Salesforce environment to illustrate the issue.

Screen Recording 2024-10-02 at 02.03.13.gif

By applying the override conditionally to only work in the Locker environment, the responsive rendering feature can be made available to at least some users.

if (!window.ResizeObserver) {
    Override.apply(ResponsiveCardOverride);
}

Result:

Screen Recording 2024-10-02 at 02.04.36.gif Screenshot 2024-10-02 at 02.11.28.png Screen Recording 2024-10-02 at 02.03.13.gif Screen Recording 2024-10-02 at 02.04.36.gif

chuckn0rris avatar Oct 02 '24 09:10 chuckn0rris