Menu

#9 edit field, Keyboard does not close when you click "Done"

closed
nobody
edit field (1)
Bug
2013-08-09
2013-08-01
No

Whenever i type into an edit field and the Keyboard pops up, it does not close when i click done. If its a text keyboard then i can click "return" and this will close the keyboard, but if its numerical, there is no return key so there is no way to close the keyboard.

Delphi XE4, Windows XP, Mac OS X. Tested on simulator. I have not tried this on the actual device.

Discussion

  • Babak Yaghoobi

    Babak Yaghoobi - 2013-08-04

    Hi, Tyson

    The default keyboard created by FM and it's a bug in the hide keyboard!

    if you want to add a custom button to keyboard for close it use this:

    uses
    FMX.VirtualKeyboard,
    FMX.Platform,
    FMX.VirtualKeyboard.iOS;

    ....

    procedure TForm1.CloseKeyboard( Sender: TObject );
    begin
    TUIApplication.Wrap( TUIApplication.OCClass.SharedApplication ).keyWindow.endEditing( true );
    end;

    // ------------------------------------------------------------------------------
    procedure TForm1.FormOnShow( Sender: TObject );
    var
    VirtualKeyboardToolbarService: IFMXVirtualKeyboardToolbarService;
    begin
    if not FCloseButtonAdded and TPlatformServices.Current.SupportsPlatformService( IFMXVirtualKeyboardToolbarService, IInterface( VirtualKeyboardToolbarService ) ) then
    begin
    VirtualKeyboardToolbarService.AddButton( 'Close', CloseKeyboard );
    end;
    end;

    regards

     
  • Kaarigar

    Kaarigar - 2013-08-05

    Hi Babak, any update on the fix for this bug? This bug also occurs with TDPFTextView also.

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-08-05

    Hi,

    Simple way you can down attachment file and put inside your project folder!

    regards

     
  • Tyson Stephen

    Tyson Stephen - 2013-08-06

    Work!! Thanks!! This was something that was keeping me from switching to the components. But i'm switching now so will report on anything that i run across.

    Keep up the great work!

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-08-09
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.