This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/edit-category-topic-template.js
2020-03-12 13:29:55 -04:00

15 lines
453 B
JavaScript

import { scheduleOnce } from "@ember/runloop";
import { buildCategoryPanel } from "discourse/components/edit-category-panel";
import { observes } from "discourse-common/utils/decorators";
export default buildCategoryPanel("topic-template", {
@observes("activeTab")
_activeTabChanged: function() {
if (this.activeTab) {
scheduleOnce("afterRender", () =>
this.element.querySelector(".d-editor-input").focus()
);
}
}
});