Ghost/core/client/mixins/popover-mixin.js
Matt Enlow 1f608cf5ab Add open class to popover buttons
Ref#3603
- Popover Buttons now have an `open` class applied to them when their popover is open
- The open class is removed from the popover button at the start of the popover's fadeout
- Consolidated common code into popover-mixin
2014-08-06 18:23:03 -06:00

13 lines
327 B
JavaScript

/*
Popovers and their buttons are evented and do not propagate clicks.
*/
var PopoverMixin = Ember.Mixin.create(Ember.Evented, {
classNameBindings: ['isOpen:open'],
isOpen: false,
click: function (event) {
this._super(event);
return event.stopPropagation();
}
});
export default PopoverMixin;