FIX: Links were not clickable after load more

The event listener function was running on the incorrect lifecycle hook.
Should've been didRender.

This commit also fixes a small bug where in some cases the screen would
not scroll all the way to the top.
This commit is contained in:
Justin DiRose 2020-07-27 11:22:28 -05:00
parent 35d234a85a
commit 699d057b94
No known key found for this signature in database
GPG Key ID: 4B811FB264021800
2 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export default Ember.Component.extend({
},
// need to handle clicks here since links are in a raw view
didInsertElement() {
didRender() {
const topicLinks = this.element.getElementsByClassName(
"knowledge-explorer-topic-link"
);

View File

@ -109,6 +109,8 @@ export default Ember.Controller.extend({
selectedTopic: topicId
});
window.scrollTo(0, 0);
KnowledgeExplorer.getTopic(topicId).then(result => {
this.setProperties({
topic: Topic.create(result),