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:
parent
35d234a85a
commit
699d057b94
|
@ -13,7 +13,7 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
// need to handle clicks here since links are in a raw view
|
// need to handle clicks here since links are in a raw view
|
||||||
didInsertElement() {
|
didRender() {
|
||||||
const topicLinks = this.element.getElementsByClassName(
|
const topicLinks = this.element.getElementsByClassName(
|
||||||
"knowledge-explorer-topic-link"
|
"knowledge-explorer-topic-link"
|
||||||
);
|
);
|
||||||
|
|
|
@ -109,6 +109,8 @@ export default Ember.Controller.extend({
|
||||||
selectedTopic: topicId
|
selectedTopic: topicId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
|
||||||
KnowledgeExplorer.getTopic(topicId).then(result => {
|
KnowledgeExplorer.getTopic(topicId).then(result => {
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
topic: Topic.create(result),
|
topic: Topic.create(result),
|
||||||
|
|
Loading…
Reference in New Issue