Ghost/ghost/admin/lib/koenig-editor/addon/services/koenig-ui.js

19 lines
437 B
JavaScript
Raw Normal View History

import Service from '@ember/service';
export default Service.extend({
captionHasFocus: false,
isDragging: false,
captionGainedFocus(caption) {
this._focusedCaption = caption;
this.set('captionHasFocus', true);
},
captionLostFocus(caption) {
if (this._focusedCaption === caption) {
this._focusedCaption = null;
this.set('captionHasFocus', false);
}
}
});