Skip to main content
Inspiring
August 22, 2013
Question

iOS multiline textfield - enter key

  • August 22, 2013
  • 0 replies
  • 690 views

I'm having a weird bug on iOS

I create 2 dynamic text fields, 1 multiline, 1 singleline. I run this on my ipad, I give the textfields focus by clicking on them to pull up the softkeyboard.

The multiline textfield will have an enter button that say "Return"

The singleline textfield will have an enter button that says "Done"

add a listener for keyup

stage.addEventListener(KeyboardEvent.KEY_UP, this._onKeyUp);

private function _onKeyUp($event:KeyboardEvent):void{

            switch($event.keyCode){

                case Keyboard.ENTER:

                trace("HELLO?");

          break;

     }

}

The trace will only work when you press "Done", it never fires for "Return"

This topic has been closed for replies.