Commit fc560bf8 authored by JC Brand's avatar JC Brand

Use this.content instead of ev.target, which is null

when using converse.js inside a webcomponent
parent 4a21d09a
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
}, },
setScrollPosition (ev) { setScrollPosition (ev) {
this.model.save('scroll_position', ev.target.scrollTop); this.model.save('scroll_position', this.content);
}, },
chooseSkinTone (ev) { chooseSkinTone (ev) {
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
onScroll (ev) { onScroll (ev) {
const { _converse } = this.__super__; const { _converse } = this.__super__;
if (ev.target.scrollTop === 0 && this.model.messages.length) { if (this.content.scrollTop === 0 && this.model.messages.length) {
const oldest_message = this.model.messages.at(0); const oldest_message = this.model.messages.at(0);
const archive_id = oldest_message.get('archive_id'); const archive_id = oldest_message.get('archive_id');
if (archive_id) { if (archive_id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment