wails
wails copied to clipboard
No scrollbars when overflow
Description
hi,
i wanted my app to show scrollbar's when the content of some area overflows. But i cannot geht the scrollbars to become visible. The content is scrollable with the mouse wheel, but in my case i do not see any scrollbar
To Reproduce
- create a default app with
wails init -n scrolltest - add this in your
frontend/index.html
<div style="width: 500px; max-height:100px; height:100px;border:1px solid black;overflow:auto" >
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
<div>asdf</div>
</div>
- you should now see an area with is scrollable but there are is no scrollbar visible
Expected behaviour
a scrollbar should at least appear when you move the mose over the area
Screenshots

Attempted Fixes
No response
System Details
~~~
❯ sys | get host
╭─────────────────┬───────────────────────────╮
│ name │ Arch Linux │
│ long_os_version │ Linux Arch Linux │
│ kernel_version │ 5.18.11-arch1-1 │
System
------
OS: Arch Linux
Version: Unknown
ID: arch
Go Version: go1.18.4
Platform: linux
Architecture: amd64
Wails
------
Version: v2.0.0-beta.40
Package Manager: pacman
Dependency Package Name Status Version
---------- ------------ ------ -------
*docker docker Installed 1:20.10.17-1
gcc gcc Installed 12.1.0-2
libgtk-3 gtk3 Installed 1:3.24.34-1
libwebkit webkit2gtk Installed 2.36.4-2
npm npm Installed 8.14.0-1
pkg-config pkgconf Installed 1.8.0-1
* - Optional Dependency
Diagnosis
---------
Your system is ready for Wails development!
~~~
Plasma 5.25.3 / Wayland
Additional context
No response
Have you tried overflow-y: scroll in your CSS?
yes, same behaviour.
when i put my test-html snippet from above in a HTML-file and open it with chrome or firefox i see a scrollbar (with both overflow: auto or overflow-y: scroll)
but when i put this code in a HTML file and show it with wails, no scrollbars appear
yes, same behaviour.
when i put my test-html snippet from above in a HTML-file and open it with chrome or firefox i see a scrollbar (with both
overflow: autooroverflow-y: scroll)but when i put this code in a HTML file and show it with wails, no scrollbars appear
In X11 forwarding the problem why scrollbars don't work is that the application window doesn't know what size it is. that's why webview2 scrollbars are gone. I think is not a problem with wails.
it's works fine for me! i'm on popos (Pop!_OS 22.04 LTS)

hi
when running with X11 it works for me too, but i use wayland and here i do not see a scrollbar
Wayland is not ready yet
Does anyone know what exactly needs to happen for Wayland? Is it that webkit2gtk doesn't support it yet?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.