You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When any child attribute of "foo" is changed (let's say "foo.baz", for instance), eventually can.observe.delegate will hit line 94, which checks:
valuesEqual=this.attr(attr.attr)!==undefined
As the obseve will never have a property named "foo.*", valuesEqual will be false and the bound event handler will never fire.
Imho this entire test should be removed:
elseif(valuesEqual&&delegate.attrs.length>1){// if there are multiple attributes, each has to at// least have some valuevaluesEqual=this.attr(attr.attr)!==undefined}
Why is it checking if all attributes have an assigned value when the documentation clearly states that a selector like "foo bar" matches changes to "foo" or "bar" ? If either is valid, the bound handler should fire. Period.
[EDIT]
Hmm.. From the looks of it, the entire value checking logic is busted as well: it assumes 'AND' semantics instead of 'OR' semantics. E.g. for a selector "foo=a bar=b", if "foo" is set to "a", while "bar" is not equal to "b" the selector will not match...
The text was updated successfully, but these errors were encountered:
Given a compound selector with a wildcard in it used in an event binding to a
can.Observe
instance:When any child attribute of "foo" is changed (let's say "foo.baz", for instance), eventually can.observe.delegate will hit line 94, which checks:
As the obseve will never have a property named "foo.*",
valuesEqual
will befalse
and the bound event handler will never fire.Imho this entire test should be removed:
Why is it checking if all attributes have an assigned value when the documentation clearly states that a selector like "foo bar" matches changes to "foo" or "bar" ? If either is valid, the bound handler should fire. Period.
[EDIT]
Hmm.. From the looks of it, the entire value checking logic is busted as well: it assumes 'AND' semantics instead of 'OR' semantics. E.g. for a selector "foo=a bar=b", if "foo" is set to "a", while "bar" is not equal to "b" the selector will not match...
The text was updated successfully, but these errors were encountered: