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
032fe0d4
Commit
032fe0d4
authored
May 27, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always scroll down when user sends a message
parent
62f0aacf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/converse-chatview.js
src/converse-chatview.js
+10
-2
No files found.
src/converse-chatview.js
View file @
032fe0d4
...
...
@@ -329,8 +329,16 @@
handleTextMessage
:
function
(
message
)
{
this
.
showMessage
(
_
.
clone
(
message
.
attributes
));
if
((
message
.
get
(
'
sender
'
)
!==
'
me
'
)
&&
(
converse
.
windowState
===
'
blur
'
)
||
this
.
model
.
get
(
'
scrolled
'
,
true
))
{
converse
.
incrementMsgCounter
();
if
(
message
.
get
(
'
sender
'
)
!==
'
me
'
)
{
if
(
converse
.
windowState
===
'
blur
'
||
this
.
model
.
get
(
'
scrolled
'
,
true
))
{
converse
.
incrementMsgCounter
();
}
}
else
{
// We remove the "scrolled" flag so that the chat area
// gets scrolled down. We always want to scroll down
// when the user writes a message as opposed to when a
// message is received.
this
.
model
.
set
(
'
scrolled
'
,
false
);
}
if
(
this
.
shouldShowOnTextMessage
())
{
this
.
show
();
...
...
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