on master help sign in
fixed obvious === bug
6821a35John P Mayer Jr
libraries/Native/Signal/Keyboard.js+9−6
@@ -46,19 +46,22 @@ Elm.Native.Keyboard = function(elm) {
46 this.recv = function(timestep, changed, parentID) {
46 this.recv = function(timestep, changed, parentID) {
47 ++count;
47 ++count;
48 if (changed) {
48 if (changed) {
49− isChanged = true;
50− // We know that a change must only be one of the following cases
49+ // We know this a change must only be one of the following cases
51− if (parentID = down.id && !(NList.member(down.value)(this.value))) {
50+ if (parentID === down.id && !(NList.member(down.value)(this.value))) {
51+ isChanged = true;
52 this.value = NList.Cons(down.value, this.value);
52 this.value = NList.Cons(down.value, this.value);
53+ }
53− } else if (parentID = up.id) {
54+ if (parentID === up.id) {
55+ isChanged = true;
54 var notEq = function(kc) { return kc !== up.value };
56 var notEq = function(kc) { return kc !== up.value };
55 this.value = NList.filter(notEq)(this.value);
57 this.value = NList.filter(notEq)(this.value);
58+ }
56− } else if (parentID = blur.id) {
59+ if (parentID === blur.id) {
60+ isChanged = true;
57 this.value = NList.Nil;
61 this.value = NList.Nil;
58 }
62 }
59 }
63 }
60 if (count == n) {
64 if (count == n) {
61− console.log(this.value);
62 send(this, timestep, isChanged);
65 send(this, timestep, isChanged);
63 isChanged = false;
66 isChanged = false;
64 count = 0;
67 count = 0;