Edg userAgent token condition and document.body.scrollTop

The placement of dropdown selections when the Edge browser is scrolled is not correct. It appears to be an issue with the conditional check. The token to test should be Edg and not Edge (Microsoft chose the Edg token to avoid compatibility issues caused by Edge string, which was previously used for the legacy Microsoft Edge browser based on EdgeHTML.) If I change it in a local copy of Radzen.Blazor.js, the placement is correct. Would it be possible to fix this?

if (/Edge/.test(navigator.userAgent)) {
      var scrollLeft = document.body.scrollLeft;
      var scrollTop = document.body.scrollTop;
    } else {
      var scrollLeft = document.documentElement.scrollLeft;
      var scrollTop = document.documentElement.scrollTop;
    }

However, even if I use Chrome, document.documentElement.scrollTop is always 0 and the value in document.body.scrollTop seems to be the value I want. Any ideas why this might be the case?

Thanks.

We will change this code and we will release update later today.

1 Like

We reverted this change - more info here:

When I updated to v. 4.5.0, the issue with the dropdown select popup offset was resolved. However, when I updated to v. 4.6.2, I observe the same behavior with the dropdown select popup not being displayed in the correct place if I have scrolled the browser window.

I am using: Microsoft Edge
Version 109.0.1518.61 (Official build) (64-bit)

Maybe it's specific to the layout of my page:
RadzenCard
RadzenPanel
RadzenTabs

  • Many dropdowns on the tabs

The problem with the dropdown selections being offset incorrectly is very pronounced because I always need to scroll down to see this content.

I'm not sure if this is enough information for you to troubleshoot. If not, I'll try to post some code later this week that displays the behavior I'm seeing.

Thank you.

Posting the exact code that we can run and reproduce the problem will be enough.

It would take me a long time to scrub the code to get rid of propriety information, so that is not an option.

Well, I'm afraid we cannot help much in this case.