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

Button out of sight not clickable when translated #22439

Open
epsmae opened this issue May 16, 2024 · 3 comments
Open

Button out of sight not clickable when translated #22439

epsmae opened this issue May 16, 2024 · 3 comments
Labels
area-controls-button Button, ImageButton migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@epsmae
Copy link

epsmae commented May 16, 2024

Description

I am Porting a Xamarin Forms application to .Net Maui. There is a layout used which is not completely visible to the user unless the user presses a button, similar to the Flyout. When the layout get translated into sight the buttons are not clickable on Android and iOS, works completely fine on Windows.

It is easy reproduceable with a few lines of code, see the linked sample

Steps to Reproduce

  1. Create new maui App
  2. Add a layout which is wider than the screen
  3. Add a button which is outside of the screen
  4. Translate until the button is visible
  5. Click the button

Link to public reproduction project repository

https://github.com/epsmae/MauiTranslationButtonClickIssue

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

@epsmae epsmae added the t/bug Something isn't working label May 16, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@epsmae
Copy link
Author

epsmae commented May 16, 2024

Thanks bot
Not exactly sure if these issues have the same root cause.
I had a look and tried the "InvalidateMeasure" suggested workaround without success.

    private void OnTranslateClicked(object? sender, EventArgs e)
    {
        TranslationLayout.TranslationX = -TranslationLayout.ColumnDefinitions[1].Width.Value;
        (TranslationLayout as IView).InvalidateMeasure();
        (CounterBtn as IView).InvalidateMeasure();
        InvalidateMeasure();
    }

@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 16, 2024
@RoiChen001
Copy link
Collaborator

Can repro this issue at Android platform on the 17.10 Preview 7(8.0.21&8.0.40).

@Eilon Eilon added the area-controls-button Button, ImageButton label May 17, 2024
@RoiChen001 RoiChen001 added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-button Button, ImageButton migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants