petermichaux / maria

The MVC framework for JavaScript applications. The real MVC. The Smalltalk MVC. The Gang of Four MVC.
BSD 2-Clause "Simplified" License
764 stars 51 forks source link

this.find() not matching full word ... #39

Closed jamesladd closed 11 years ago

jamesladd commented 11 years ago

I have two elements in my DOM, one classed "detail" and one classed "details". When I use this.find('.detail') it matches on '.details'.

Is it possible it also needs to use the size of the word in the match?

petermichaux commented 11 years ago

I just added a test to the Grail library for this use case of a partial class name in the selector matching a longer class name in an element. The Grail library does not make a match in this case which is correct

https://github.com/petermichaux/grail/commit/cedf495f26aab3519431c4855964bb5a0e323c82

Can you provide a complete example that I can run showing the problem?