Thanks @hamishdickson for the report!
Closes gh-1769
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
function returnTrue() {
return true;
.off("whoops");
});
+test("Empty namespace is ignored", function(){
+ expect( 1 );
+
+ jQuery("#firstp")
+ .on( "meow.", function( e ) {
+ equal( e.namespace, "", "triggered a namespace-less meow event" );
+ })
+ .trigger("meow.")
+ .off("meow.");
+});
+
test("on(), with same function", function() {
expect(2);