From cd1b83997b5a12369c51279fd5815a0f33811e9f Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 6 Nov 2015 15:10:28 -0500 Subject: [PATCH] FIX: Weird UX with `d-editor` for topic templates --- .../discourse/components/edit-category-topic-template.js.es6 | 5 +---- app/assets/stylesheets/common/d-editor.scss | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 b/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 index 308d3223eab..6135d4b5456 100644 --- a/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 @@ -3,10 +3,7 @@ import { buildCategoryPanel } from 'discourse/components/edit-category-panel'; export default buildCategoryPanel('topic-template', { _activeTabChanged: function() { if (this.get('activeTab')) { - const self = this; - Ember.run.schedule('afterRender', function() { - self.$('.d-editor-input').focus(); - }); + Ember.run.scheduleOnce('afterRender', () => this.$('.d-editor-input').focus()); } }.observes('activeTab') }); diff --git a/app/assets/stylesheets/common/d-editor.scss b/app/assets/stylesheets/common/d-editor.scss index d9bdbca3534..fa5f9071449 100644 --- a/app/assets/stylesheets/common/d-editor.scss +++ b/app/assets/stylesheets/common/d-editor.scss @@ -71,7 +71,6 @@ color: $primary; border: 1px dashed dark-light-diff($primary, $secondary, 90%, -60%); overflow: auto; - visibility: visible; cursor: default; margin-top: 8px; padding: 8px 8px 0 8px;