Reveal accidentally unbound all event handlers when openOn option is '' #74

billccn opened this Issue Jun 1, 2012 · 2 comments


None yet

2 participants


I have traced down the problem to the line:
base.$el.unbind( (o.openOn) ? o.openOn + '.keyboard' : '');

Apparently there is an undocumented behavior in jQuery where when the argument to unbind() is empty string, all event handlers are removed. This should be the behavior for unbind() with no arguments, but obviously they didn't do enough checking.

I made a jsfiddle for this. This unexpected behavior started as early as version 1.4.4.

I propose the following fix:

if (o.openOn) {
base.$el.unbind( o.openOn + '.keyboard');


Thanks for sharing this issue! I'll include your fix in the next update!

@Mottie Mottie closed this in beb9247 Jun 17, 2012

Thanks again billccn! I've added your recommendations in the latest version 1.9.19. I appreciate the help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment