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
1d14a2b9
Commit
1d14a2b9
authored
Sep 18, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use const for enter key
parent
46fe0ac5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
converse.js
converse.js
+4
-1
No files found.
converse.js
View file @
1d14a2b9
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
var
UNVERIFIED
=
1
;
var
UNVERIFIED
=
1
;
var
VERIFIED
=
2
;
var
VERIFIED
=
2
;
var
FINISHED
=
3
;
var
FINISHED
=
3
;
var
KEY
=
{
ENTER
:
13
};
// Default values
// Default values
var
converse
=
this
;
var
converse
=
this
;
...
@@ -785,7 +788,7 @@
...
@@ -785,7 +788,7 @@
keyPressed
:
function
(
ev
)
{
keyPressed
:
function
(
ev
)
{
var
$textarea
=
$
(
ev
.
target
),
var
$textarea
=
$
(
ev
.
target
),
message
,
notify
,
composing
;
message
,
notify
,
composing
;
if
(
ev
.
keyCode
==
13
)
{
if
(
ev
.
keyCode
==
KEY
.
ENTER
)
{
ev
.
preventDefault
();
ev
.
preventDefault
();
message
=
$textarea
.
val
();
message
=
$textarea
.
val
();
$textarea
.
val
(
''
).
focus
();
$textarea
.
val
(
''
).
focus
();
...
...
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