-5

i am learning to develop... I can't close the mobile keyboard on the event (keyup.enter)...

somebody can halp me??

i am using angular 6+

thanks!

Khael Bubniak
  • 152
  • 2
  • 8

1 Answers1

0

you can check this

function hideKeyboard(element) {
    element.attr('readonly', 'readonly'); // Force keyboard to hide on input field.
    element.attr('disabled', 'true'); // Force keyboard to hide on textarea field.
    setTimeout(function() {
        element.blur();  //actually close the keyboard
        // Remove readonly attribute after keyboard is hidden.
        element.removeAttr('readonly');
        element.removeAttr('disabled');
    }, 100);
}
Chunbin Li
  • 2,196
  • 1
  • 17
  • 31