Skip to content
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

Buttons at end of layout (and Gesture Recognizers) do not trigger! ... Unless you HOT RELOAD the page #14292

Closed
innomotionmedia opened this issue Mar 30, 2023 · 10 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working

Comments

@innomotionmedia
Copy link

Description

This issue is sooo annyoing.
There is no way of getting a button to work at the bottom of a page UNLESS every single element before that gets a fixed height. No matter wehter it is inside a stack layout, vertical one, grid, - all elements have to have a set size so that the buttons at the bottom work.

They work at the top - they work with some elements above them - but once they are inside a scrollview and at the bottom they stop working...

UNLESS you edit the layout live and let xaml hot reload reload the page. Then the button works but this one time.
STart the app anew and the button is broken again.

It is rendered fine.
Just not clickable.

Steps to Reproduce

new project, create views add button

Link to public reproduction project repository

none

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

all

Did you find any workaround?

No response

Relevant log output

No response

@innomotionmedia innomotionmedia added the t/bug Something isn't working label Mar 30, 2023
@mattleibow
Copy link
Member

I see this issue says this is broken on .NET 6 and on all platforms?

Have you tried .NET 7?

Related to #14257 maybe?

@mattleibow mattleibow added s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Mar 30, 2023
@ghost
Copy link

ghost commented Mar 30, 2023

Hi @innomotionmedia. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost
Copy link

ghost commented Mar 30, 2023

Hi @innomotionmedia. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@innomotionmedia
Copy link
Author

I have more info on that; the issue comes from the scrollview when data is populated into it later. It doesnt resize its layout. A workaround is to add an eventhandler to all the child layouts inside the scrollview that potentually could resize due to layout changes (item gets removed or added) and then for a resize on the scrollview:

private void VerticalStackLayout_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
    (scrollView as IView)?.InvalidateMeasure(); // if not done, everything else will fail 
}

in XAML:

<VerticalStackLayout PropertyChanged="VerticalStackLayout_PropertyChanged" (add this to every layout that is inside the scrollview and could change its content at rumtime)

this in the end works.

So my guess is that the hitbox around the button does not get shifted down while the UI element itself does.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Mar 31, 2023
@drasticactions drasticactions added the s/needs-repro Attach a solution or code which reproduces the issue label Mar 31, 2023
@ghost
Copy link

ghost commented Mar 31, 2023

Hi @innomotionmedia. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@drasticactions
Copy link
Contributor

I apologize; I'm not sure I understand what you're saying. Could you create a reproduction project showing your expectations and what you're trying to do?

@drasticactions
Copy link
Contributor

Maybe it's related to #14257?

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Mar 31, 2023
@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Apr 4, 2023
@ghost
Copy link

ghost commented Apr 4, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Apr 7, 2023
@MichaelNovikov
Copy link

Workaround with an InvalidateMeasure doesn't work anymore!

@ghost
Copy link

ghost commented May 1, 2023

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

@ghost ghost removed the s/no-recent-activity Issue has had no recent activity label May 1, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 31, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants