Ghost/core/client/app/mixins/dropdown-mixin.js

17 lines
367 B
JavaScript
Raw Normal View History

2015-02-13 07:22:32 +03:00
import Ember from 'ember';
/*
2014-09-28 19:39:25 +04:00
Dropdowns and their buttons are evented and do not propagate clicks.
*/
2014-09-28 19:39:25 +04:00
var DropdownMixin = Ember.Mixin.create(Ember.Evented, {
classNameBindings: ['isOpen:open:closed'],
isOpen: false,
click: function (event) {
this._super(event);
return event.stopPropagation();
}
});
export default DropdownMixin;