Keyboard icon indicating copy to clipboard operation
Keyboard copied to clipboard

Keyboard's value doesn't get updated programmatically and it closes as well

Open sajalsuraj opened this issue 5 years ago • 3 comments

Hi,

I am using this keyboard in an Angular project, my requirement is to update the keyboard value programmatically, but the moment value reaches the point, the keyboard got closed. This happens when the angular page/component is navigated more than once.

This is the function that I wrote to update the value -

addNewScannedValue(val){
    var keyboard = $('.input-keyboard').getkeyboard();
    var k = keyboard
      .reveal()
      .setValue(val)
      .$el.trigger('change');
  }

Value doesn't get updated on the keyboard and the keyboard closes automatically. Please help me. @Mottie

sajalsuraj avatar Oct 23 '21 06:10 sajalsuraj

Which version of Angular are you using? The latest, Angular 12?

contra8 avatar Nov 03 '21 12:11 contra8

@contra8 I am using Angular 8.

sajalsuraj avatar Nov 07 '21 16:11 sajalsuraj

I have resolved this problem. I have removed the keyboard events such as getKeyboard() and reveal() and just using "keyboard.$preview.focus()". This resolved my issue. Closing this issue for now.

sajalsuraj avatar Nov 07 '21 16:11 sajalsuraj