-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model.at(DOM node) gives the wrong object #158
Comments
Here's a testcase for it. The issue can be seen in the url Url |
I had the same problem. I just submitted a patch. The problem is the whitespace between the li tag and the {#each}. If you remove it the problem should go away. [https://github.com//pull/162] |
My issue was different. The testcase above shows the problem. |
BTW, I needed at least two things: 1) getting rid of the white space and 2) adding the end tag to the component. |
Master of Derby is now the rewritten 0.6 and I am removing previous issues pretty aggressively so that I can be more responsive to new issues. Please re-open if this issue is still relevant in Derby 0.6. |
https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/-RaUK0cH0Ak
I'm having a problem getting the model from a DOM object. I have a list (ul) of things, made with #each. Model.at() gives a wrong object.
Template:
_items:
Bound function:
So, the HTML page looks like this:
When I click the first one on the list, I get this output:
This is the next (2nd) one in the model, not the first one I clicked. If I click the 2nd from the list, it would skip to the fourth one if there was anything there.
Also the same happens if I use the el variable instead of e.target in the test function.
So.. I'm at loss here. Is this a bug, anyone seen this? I'm using derby 0.3.13.
The text was updated successfully, but these errors were encountered: