-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Problem/Bug]: native-scrollbar
ignoring CSS styling, causing improper appearance and app look.
#4131
Comments
@cryptofyre - Any chance you can share the repro in vanilla CSS or a pointer to URL with the issue? I don't think anyone on our team has SCSS familiarity, so that might be a speed bump to looking at this. Also if this repros in the browser would be super useful information @nishitha-burman This is a custom implementation of overlay scrollbars that someone made and is broken in 119, can you see if Olga's team has made any changes that might be the cause? |
I've updated the issue to use the computed SCSS stylesheets back to standard CSS which should make this easier for you, as for the browser, Edge |
@cryptofyre can you please provide more context on |
Meant to say As for reproducing it in edge, you can use the same javascript line to have edge try and utilize its own scrollbars. You'll need to make a quick little HTML page with a few scrollable elements with the CSS I've updated in the issue which then you can see the before and after when you attempt using the Let me know if you need anything else! |
I wasn't able to find documentation for |
Seems to be largely related to the |
Good news, this issue appears to be fixed as of 120.0.2210.61! |
Closing this issue then! Thanks for the update |
I am still having the same issue as @cryptofyre on version /* Scroll Bars */
body ::-webkit-scrollbar {
width: 5px;
height: 5px;
z-index: 999999;
}
body ::-webkit-scrollbar-corner {
background-color: inherit;
}
body ::-webkit-scrollbar-track {
background-color: rgba(0, 0, 0, 0.05);
}
body ::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 16px;
}
body ::-webkit-scrollbar-button {
display: none;
}
body ::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
cursor: default !important;
} |
Fixed the problem. body .ui {
scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.1);
scrollbar-width: thin;
} Fix by override: body .ui {
scrollbar-color: auto;
scrollbar-width: auto;
} The problem was not present in older version of Edge though. |
What happened?
Recently as of the newest stable update to the WebView 2 runtime
119.0.2151.44
thenative-scrollbar
document body attribute seems to ignore all CSS styling on overlay scrollbars causing them to appear opaque and always show even without mouse hover or if the content is empty.We've been able to fix this for the time being by removing the page attribute, but we like the style and functionality of the W11/native ones so it's a shame these no longer work as they should.
Before (Scrollbars properly hidden til hover, and effectively styled) [118.0.2088.76]
After (Scrollbars shown at all times and misstyled) [119.0.2151.44]
Temporary Fix (Removed
native-scrollbar
attribute, not preferred.) [119.0.2151.44]Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
119.0.2151.44
SDK Version
webview2-com 0.19 (Rust)
Framework
Other
Operating System
Windows 11
OS Version
23580.1000 (Also bugged on Stable, Beta)
Repro steps
Set up a new WebView2 application and have the attribute set for
native-scrollbar
set to1
This can be done using the following
document.body.setAttribute('native-scrollbar', "1");
Then create a few overlay scrollbars under certain mouseover and visibility scenarios under the old
118.0.2088.76
runtime.Once you switch over to
119.0.2151.44
, those scrollbars will now always show and disobey styling instead of being styled as they should be to how you had them setup prior on118.0.2088.76
Here's some of our example css styles for the scrollbars:
Regression
Regression in newer Runtime
Last working version (if regression)
Runtime 118.0.2088.76
The text was updated successfully, but these errors were encountered: