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

MAUI When clicking blank and the keyboard is hidden, Entry does not have corresponding processing events And Xamarin can handle. #18125

Closed
BaY1251 opened this issue Oct 19, 2023 · 7 comments
Labels
area-controls-entry Entry migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed
Milestone

Comments

@BaY1251
Copy link
Contributor

BaY1251 commented Oct 19, 2023

@PureWeen In Xamarin, Entry did ultimately capture the focus, but after the soft keyboard disappeared, Unfocused was triggered for verification

The point is not the focus, but Entry needs to know that the soft keyboard is turned off in order to verify the data.

The core issue is that Entry needs to know that the keyboard has been turned off.
The handling event in Xamarin happens to be unfocused.
MAUI can have other events

Version with bug
8.0.0-rc.2.9373

Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms

Affected platforms
Android

The image is a demonstration by Xamarin, and MAUI is currently unable to achieve this effect
Keyboard
assert

Originally posted by @BaY1251 in #16530 (comment)

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Oct 19, 2023
@mattleibow
Copy link
Member

@PureWeen thoughts?

@mattleibow mattleibow added this to the Backlog milestone Oct 19, 2023
@ghost
Copy link

ghost commented Oct 19, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@mattleibow mattleibow added s/triaged Issue has been reviewed s/needs-info Issue needs more info from the author labels Oct 19, 2023
@ghost
Copy link

ghost commented Oct 19, 2023

Hi @BaY1251. 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.

@mattleibow
Copy link
Member

@BaY1251 what platform is this?

@BaY1251
Copy link
Contributor Author

BaY1251 commented Oct 20, 2023

@mattleibow
Version with bug
8.0.0-rc.2.9373

Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms

Affected platforms
Android

@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 labels Oct 20, 2023
@maonaoda
Copy link
Contributor

https://github.com/PureWeen/ShanedlerSamples/blob/0d4c4f4916fb765e0e7a37da85e42820b4e663af/ShanedlerSamples/Library/TapToCloseBehavior/TapToCloseBehavior.Android.cs#L145C1-L157C14

            public bool OnSingleTapUp(MotionEvent e)
            {
                var location = GetBoundingBox(_platformView);
                var point = new Point(e.RawX, e.RawY);

                if (location.Contains(point))
                    return true;

                if (KeyboardManager.IsSoftKeyboardVisible(_view))
                    KeyboardManager.HideKeyboard(_view);

               ```
                // Custom here: alawys clear focus
                if (_platformView.HasFocus && _view.IsFocused)                
                {
                    _platformView.ClearFocus();
                }
              ```

                return true;
            }

Based on TapToCloseBehavior , I have added my Custom for keeping Android with iOS that can clear focus after Hiding Keyboard.

@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Oct 20, 2023
@PureWeen
Copy link
Member

PureWeen commented Nov 6, 2023

Duplicate of #16357

We can't have unfocusing an entry be a side effect of closing the SoftKeyboard for various a11y reasons, but we do need to supply an API that will let users fill in what they were using the unfocused event for. Which is what the issue linked above should do.

@PureWeen PureWeen closed this as completed Nov 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-entry Entry migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed
Projects
None yet
Development

No branches or pull requests

7 participants