Keyboard removes itself on second entry
bknill opened this issue · 1 comments
bknill commented
If I
- show keyboard
- set a character
- press enter
- then reshow the keyboard with a new label
- enter another character
The keyboard disapears, without any events.
If I then point the cursor at where it was, I can get it to click a character, then it shows itself again.
this.keyboard.setAttribute('super-keyboard',{
label,
show:true,
})
this.keyboard.addEventListener('superkeyboardismiss', e => console.log('dismiss'))
this.keyboard.addEventListener('superkeyboardinput', e => onEnter(e.detail.value))
How I'm managing it
` signIn: function (){
this.hideOptions()
this.showKeyboard('Please enter your email', this.validateEmail.bind(this))
this.title.setAttribute('text', {value: 'Sign In'})
},
validateEmail: function (value){
if(!validateEmail(value))
return this.showKeyboard('Please enter a valid email', this.validateEmail.bind(this))
this.el.setAttribute('login', {email:value})
this.showKeyboard('Please enter your password', this.processSignIn.bind(this))
},
processSignIn: function(value){
console.log(this.data.email, value)
},
signUp: function (){},
showKeyboard: function (label, onEnter){
this.el.setAttribute('follow-orientation', {disabled: true})
this.keyboard.setAttribute('super-keyboard',{
label,
show:true,
})
this.keyboard.addEventListener('superkeyboardismiss', e => console.log('dismiss'))
this.keyboard.addEventListener('superkeyboardinput', e => onEnter(e.detail.value))
},`
bknill commented
I've got around it by completely removing the keyboard and recreating it for each entry however this isn't ideal..