wails icon indicating copy to clipboard operation
wails copied to clipboard

No scrollbars when overflow

Open ulrichSchreiner opened this issue 3 years ago • 3 comments

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

  1. create a default app with wails init -n scrolltest
  2. 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>
  1. 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

grafik

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

ulrichSchreiner avatar Jul 24 '22 14:07 ulrichSchreiner

Have you tried overflow-y: scroll in your CSS?

leaanthony avatar Jul 24 '22 21:07 leaanthony

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

ulrichSchreiner avatar Jul 25 '22 05:07 ulrichSchreiner

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

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.

zandercodes avatar Aug 04 '22 06:08 zandercodes

it's works fine for me! i'm on popos (Pop!_OS 22.04 LTS)

image

zakaria-chahboun avatar Sep 16 '22 18:09 zakaria-chahboun

hi

when running with X11 it works for me too, but i use wayland and here i do not see a scrollbar

ulrichSchreiner avatar Sep 22 '22 13:09 ulrichSchreiner

Wayland is not ready yet

zakaria-chahboun avatar Sep 23 '22 23:09 zakaria-chahboun

Does anyone know what exactly needs to happen for Wayland? Is it that webkit2gtk doesn't support it yet?

leaanthony avatar Sep 23 '22 23:09 leaanthony

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.

stale[bot] avatar Nov 02 '22 02:11 stale[bot]