XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

[MaterialInputDialog] Auto focus + close on completion

Open DominicMaas opened this issue 4 years ago • 2 comments

🚀 Feature Requests

The following discusses my experience on Android, I'm not sure about other platforms.

I'm happy to submit a small PR to auto focus on the text field when the input dialog opens and hook up the completion event to close the dialog when the user taps on the return key (if the positive button is enabled).

Currently you must tap on the text field manually before entering text, and when you're done you must tap on the positive button. This change would make it so that you can simply start typing straight away, and then press the return key to close the dialog (Completion event).

I'm not sure what the side effects of doing this are (and if it's against the Material Design guidelines), so I'm happy to chuck these changes behind an optional flag.

Current Changes

Platforms affected (mark all that apply)

  • [ ] :iphone: iOS
  • [ ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [x] :monkey: Xamarin.Forms

DominicMaas avatar Apr 08 '21 22:04 DominicMaas

How you can achieve this? (AUTOFOCUS)

OscarHMG avatar Jul 06 '21 16:07 OscarHMG

See my "Current Changes" link, I ended up making a copy of the dialog into my own project where I made the change.

DominicMaas avatar Jul 08 '21 06:07 DominicMaas