1
0
mirror of https://github.com/flarum/core.git synced 2025-02-25 19:53:48 +01:00
php-flarum/ember/app/mixins/modal-view.js

17 lines
421 B
JavaScript
Raw Normal View History

2015-02-08 15:59:39 +10:30
import Ember from 'ember';
export default Ember.Mixin.create({
focusEventOn: function() {
this.get('controller').on('focus', this, this.focus);
}.on('didInsertElement'),
focusEventOff: function() {
this.get('controller').off('focus', this, this.focus);
}.on('willDestroyElement'),
focus: function() {
this.$('input:first:visible:enabled').focus();
console.log('focus first')
}.on('didInsertElement')
});