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
Joffrey JAFFEUX 5e24436454
DEV: attempts to fix various leaks (#9428)
* DEV: attempts to fix various leaks

* scheduleOnce doesnt work with anon function

* removes the I18n change
2020-04-16 07:58:04 +02:00

15 lines
445 B
JavaScript

import { schedule } 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) {
schedule("afterRender", () =>
this.element.querySelector(".d-editor-input").focus()
);
}
}
});