core icon indicating copy to clipboard operation
core copied to clipboard

Demo app: Simple Element value binding is failing with new changes

Open nallarv opened this issue 7 years ago • 2 comments

First of all, thanks for taking the time to pull in some changes. However, with the latest changes, the demo app is throwing errors when I try to change the value inside the input with simple element.value binding. The following screenshot shows what I am referring to.

image

[Error] ERROR TypeError: undefined is not an object (evaluating 'this.control.value') _setCursorPosition — main.50cc1a515ef0282be717.bundle.js:1:327769

It should be easy to reproduce this. On the demo app, click on the swiss bank combination lock input and use the virtual keyboard to edit it. You should see the error as shown above.

I suspect the error is coming from MatkeyboardKeyComponent._setCursorPosition(),

nallarv avatar Feb 22 '18 01:02 nallarv

Refs #45

davidenke avatar Feb 22 '18 08:02 davidenke

I face the same issue. I have embedded the keyboard into a very basic sample page and get the same error:

Chromium Version 63.0.3239.84 (Official Build) Built on Ubuntu , running on Ubuntu 14.04 (64-bit)

MatKeyboardKeyComponent.html:1 ERROR TypeError: Cannot read property 'value' of undefined
    at MatKeyboardKeyComponent._setCursorPosition (ngx-material-keyboard-core.js:7100)
    at MatKeyboardKeyComponent.onClick (ngx-material-keyboard-core.js:7074)
    at Object.eval [as handleEvent] (MatKeyboardKeyComponent.html:7)
    at handleEvent (core.js:13530)
    at callWithDebugContext (core.js:15039)
    at Object.debugHandleEvent [as handleEvent] (core.js:14626)
    at dispatchEvent (core.js:9945)
    at eval (core.js:10570)
    at HTMLButtonElement.eval (platform-browser.js:2628)
    at ZoneDelegate.invokeTask (zone.js:421)

sromberg avatar Mar 10 '18 21:03 sromberg