Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
08fc0823
Commit
08fc0823
authored
Feb 25, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More scrolling improvements
parent
ad1d5c6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/converse-chatview.js
src/converse-chatview.js
+6
-3
No files found.
src/converse-chatview.js
View file @
08fc0823
...
@@ -135,8 +135,8 @@
...
@@ -135,8 +135,8 @@
},
},
afterMessagesFetched
:
function
()
{
afterMessagesFetched
:
function
()
{
this
.
scrollDown
();
this
.
insertIntoDOM
();
this
.
insertIntoDOM
();
this
.
scrollDown
();
// We only start listening for the scroll event after
// We only start listening for the scroll event after
// cached messages have been fetched
// cached messages have been fetched
this
.
$content
.
on
(
'
scroll
'
,
this
.
markScrolled
.
bind
(
this
));
this
.
$content
.
on
(
'
scroll
'
,
this
.
markScrolled
.
bind
(
this
));
...
@@ -155,7 +155,10 @@
...
@@ -155,7 +155,10 @@
/* This method gets overridden in src/converse-controlbox.js if
/* This method gets overridden in src/converse-controlbox.js if
* the controlbox plugin is active.
* the controlbox plugin is active.
*/
*/
$
(
'
#conversejs
'
).
prepend
(
this
.
$el
);
var
container
=
document
.
querySelector
(
'
#conversejs
'
);
if
(
this
.
el
.
parentNode
!==
container
)
{
container
.
insertBefore
(
this
.
el
,
container
.
firstChild
);
}
return
this
;
return
this
;
},
},
...
@@ -821,7 +824,7 @@
...
@@ -821,7 +824,7 @@
* instance, so that we have it debounced per instance.
* instance, so that we have it debounced per instance.
* Debouncing it on the class-level is too broad.
* Debouncing it on the class-level is too broad.
*/
*/
this
.
debouncedScrollDown
=
_
.
debounce
(
this
.
_scrollDown
,
250
,
{
'
leading
'
:
true
}
);
this
.
debouncedScrollDown
=
_
.
debounce
(
this
.
_scrollDown
,
250
);
}
}
this
.
debouncedScrollDown
.
apply
(
this
,
arguments
);
this
.
debouncedScrollDown
.
apply
(
this
,
arguments
);
return
this
;
return
this
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment