diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 18e9f396974..ec55a75ed78 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -101,9 +101,9 @@ export default Discourse.Controller.extend({ if(composer.get('cantSubmitPost')) { var now = Date.now(); this.setProperties({ - "view.showTitleTip": now, - "view.showCategoryTip": now, - "view.showReplyTip": now + 'view.showTitleTip': now, + 'view.showCategoryTip': now, + 'view.showReplyTip': now }); return; } diff --git a/app/assets/javascripts/discourse/views/composer/composer_view.js b/app/assets/javascripts/discourse/views/composer/composer_view.js index 57957c32f0c..203d3997dbb 100644 --- a/app/assets/javascripts/discourse/views/composer/composer_view.js +++ b/app/assets/javascripts/discourse/views/composer/composer_view.js @@ -404,12 +404,24 @@ Discourse.ComposerView = Discourse.View.extend(Ember.Evented, { // I hate to use Em.run.later, but I don't think there's a way of waiting for a CSS transition // to finish. - return Em.run.later(jQuery, (function() { + Em.run.later(jQuery, (function() { var replyTitle = $('#reply-title'); self.resize(); self.refreshPreview(); return replyTitle.length ? replyTitle.putCursorAtEnd() : $wmdInput.putCursorAtEnd(); }), 300); + + $('#reply-title').on('focusout', function(){ + self.set('showTitleTip', Date.now()); + }); + + $('#wmd-input').on('focusout', function(){ + self.set('showReplyTip', Date.now()); + }); + + self.$('.category-input').on('focusout', function(){ + self.set('showCategoryTip', Date.now()); + }); }, addMarkdown: function(text) {