fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
24.49k stars 1.36k forks source link

Mobile: open pop-up (or any other overlay) does not play well with window-head #4856

Open toaster opened 3 months ago

toaster commented 3 months ago

Checklist

Describe the bug

When opening a pop-up (or other overlays) on a subsequent mobile window (i.e., one with a window-head), it disables all interaction outside the pop-up including the “close window” button (good) but it does not expand the transparent overlay background to the window-head and thus does not close the pop-up when tapping there (bad). This leads to the impression that the “close window” button is broken, if there’s still a pop-up open.

How to reproduce

  1. Open a subsequent mobile window.
  2. Open a pop-up there.
  3. Tap on the “close window” button in the window-head while the pop-up is still open.

Screenshots

No response

Example code

package main

import (
    "fyne.io/fyne/v2/app"
    "fyne.io/fyne/v2/container"
    "fyne.io/fyne/v2/widget"
)

func main() {
    a := app.New()
    w := a.NewWindow("main")
    b := widget.NewButton("Open Window", func() {
        sw := a.NewWindow("sub")
        sw.SetContent(
            container.NewVBox(
                widget.NewSelect([]string{"one", "two"}, func(string) {}),
            ),
        )
        sw.Show()
    })
    w.SetContent(b)
    w.ShowAndRun()
}

Fyne version

develop

Go compiler version

1.22.1

Operating system and version

macOS 14.5

Additional Information

No response

andydotxyz commented 3 months ago

To be consistent with other platforms shouldn't the close window button still work even if there is a popup over the content?

toaster commented 3 months ago

Yeah, that would be one way to solve the issue.

andydotxyz commented 2 months ago

I think this was resolved now @toaster ?

toaster commented 2 months ago

I think this was resolved now @toaster ?

Why do you think so? I did nothing to solve this. That’s why I created the issue :).

andydotxyz commented 2 months ago

Sorry I just remember a conversation about the details of solving it and my head jumped to conclusions.