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
2d6d4df1
Commit
2d6d4df1
authored
Oct 17, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use requestAnimationFrame instead of setTimeout
For better performance.
parent
acf3329a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
src/converse-chatview.js
src/converse-chatview.js
+1
-1
src/converse-headline.js
src/converse-headline.js
+1
-1
src/converse-muc.js
src/converse-muc.js
+2
-2
src/utils.js
src/utils.js
+7
-5
No files found.
src/converse-chatview.js
View file @
2d6d4df1
...
...
@@ -137,7 +137,7 @@
this
.
$content
=
this
.
$el
.
find
(
'
.chat-content
'
);
this
.
renderToolbar
().
renderAvatar
();
converse
.
emit
(
'
chatBoxOpened
'
,
this
);
window
.
setTimeout
(
utils
.
refreshWebkit
,
50
);
utils
.
refreshWebkit
(
);
return
this
.
showStatusMessage
();
},
...
...
src/converse-headline.js
View file @
2d6d4df1
...
...
@@ -110,7 +110,7 @@
}
this
.
$content
=
this
.
$el
.
find
(
'
.chat-content
'
);
converse
.
emit
(
'
chatBoxOpened
'
,
this
);
window
.
setTimeout
(
utils
.
refreshWebkit
,
50
);
utils
.
refreshWebkit
(
);
return
this
;
}
});
...
...
src/converse-muc.js
View file @
2d6d4df1
...
...
@@ -4,7 +4,7 @@
// Copyright (c) 2012-2016, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global Backbone, define
, window
*/
/*global Backbone, define */
/* This is a Converse.js plugin which add support for multi-user chat rooms, as
* specified in XEP-0045 Multi-user chat.
...
...
@@ -284,7 +284,7 @@
info_configure
:
__
(
'
Configure this room
'
),
})));
this
.
renderChatArea
();
window
.
setTimeout
(
converse
.
refreshWebkit
,
50
);
utils
.
refreshWebkit
(
);
return
this
;
},
...
...
src/utils.js
View file @
2d6d4df1
...
...
@@ -237,11 +237,13 @@
/* This works around a webkit bug. Refreshes the browser's viewport,
* otherwise chatboxes are not moved along when one is closed.
*/
if
(
$
.
browser
.
webkit
)
{
var
conversejs
=
document
.
getElementById
(
'
conversejs
'
);
conversejs
.
style
.
display
=
'
none
'
;
var
tmp
=
conversejs
.
offsetHeight
;
// jshint ignore:line
conversejs
.
style
.
display
=
'
block
'
;
if
(
$
.
browser
.
webkit
&&
window
.
requestAnimationFrame
)
{
window
.
requestAnimationFrame
(
function
()
{
var
conversejs
=
document
.
getElementById
(
'
conversejs
'
);
conversejs
.
style
.
display
=
'
none
'
;
var
tmp
=
conversejs
.
offsetHeight
;
// jshint ignore:line
conversejs
.
style
.
display
=
'
block
'
;
});
}
},
...
...
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