input value change

69 views
Skip to first unread message

josger...@gmail.com

unread,
Apr 17, 2014, 11:29:55 AM4/17/14
to polym...@googlegroups.com
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.

Erik Arvidsson

unread,
Apr 17, 2014, 11:32:09 AM4/17/14
to josger...@gmail.com, polym...@googlegroups.com
We do this in the tests by dispatching "input" events. 


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f77c75d0-184a-4cfa-839a-23d84d4e308e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
erik


Reply all
Reply to author
Forward
0 new messages