Hey guys,
I´m building a virtual keyboard component in a project completely built on Polymer.
I have a component called wst-keyboard and a component wst-dialog(just an overlay with an input field).
The wst-keyboard component (simplified ofcourse). Whenever i open a keyboard i'm sending the input element along (in this case the input element from the dialog).
Polymer('wst-keyboard', {
alphaNumericVisible: false,
input: null,
onCharacterClick: function(e) {
e.preventDefault();
e.stopPropagation();
var character = e.target.getAttribute('data-character');
this.input.value += character;
},
openAlphaNumeric: function(input) {
var self = this;
this.input = input;
this.alphaNumericVisible = true;
this.input.addEventListener('blur', function(e) {
self.alphaNumericVisible = false;
});
}
});
My problem here is that the input.value does change in the dialog input field. But the databinding doesn't work. However, it does work when i use my normal keyboard.
I've tried firing DomAttrModified, change, keyup, keypress and keydown events in the hope the observer would update the property in the dialog.
Does anyone have a solution for this?
Thanks in advance :)
Jos.