merb_screw_unit's preventDefault on the mock event object should be a function not an attribute
Reported by Drew Chandler | October 4th, 2008 @ 11:21 AM | in 1.0
Line 30 of merb-plugins/merb_screw_unit/app/views/layout/merb_screw_unit.html.erb is currently:
var basic = {type: event, target: this, preventDefault: true}
I think it should be:
var basic = {type: event, target: this, preventDefault: function() { true }}
Without the change, the following code causes "TypeError: event.preventDefault is not a function"
$('a').click(function(event) {
event.preventDefault();
});
Doing preventDefault without the parens makes the tests happy but then outside the tests your javascript is messed up because it is not preventing the default action from taking place.
Comments and changes to this ticket
-
Michael Klishin (antares) October 10th, 2008 @ 04:13 PM
- → Assigned user changed from to Yehuda Katz (wycats)
- → Milestone changed from to 1.0
- → State changed from new to open
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
