Commit 199e2e7e authored by JC Brand's avatar JC Brand

The `refreshWebkit` hack appears to no longer be necessary

parent 4652385b
...@@ -31,7 +31,7 @@ require.config({ ...@@ -31,7 +31,7 @@ require.config({
"form-utils": "src/form-utils", "form-utils": "src/form-utils",
"i18n": "src/i18n", "i18n": "src/i18n",
"jed": "node_modules/jed/jed", "jed": "node_modules/jed/jed",
"jquery.browser": "node_modules/jquery.browser/dist/jquery.browser", "jquery": "src/jquery-stub",
"lodash": "node_modules/lodash/lodash", "lodash": "node_modules/lodash/lodash",
"lodash.converter": "3rdparty/lodash.fp", "lodash.converter": "3rdparty/lodash.fp",
"lodash.fp": "src/lodash.fp", "lodash.fp": "src/lodash.fp",
......
...@@ -289,7 +289,6 @@ ...@@ -289,7 +289,6 @@
this.model.on('sendMessage', this.sendMessage, this); this.model.on('sendMessage', this.sendMessage, this);
this.render().renderToolbar().insertHeading().fetchMessages(); this.render().renderToolbar().insertHeading().fetchMessages();
u.refreshWebkit();
_converse.emit('chatBoxOpened', this); _converse.emit('chatBoxOpened', this);
_converse.emit('chatBoxInitialized', this); _converse.emit('chatBoxInitialized', this);
}, },
...@@ -968,7 +967,6 @@ ...@@ -968,7 +967,6 @@
hide () { hide () {
this.el.classList.add('hidden'); this.el.classList.add('hidden');
u.refreshWebkit();
return this; return this;
}, },
......
...@@ -386,7 +386,6 @@ ...@@ -386,7 +386,6 @@
return; return;
} }
u.addClass('hidden', this.el); u.addClass('hidden', this.el);
u.refreshWebkit();
_converse.emit('chatBoxClosed', this); _converse.emit('chatBoxClosed', this);
if (!_converse.connection.connected) { if (!_converse.connection.connected) {
_converse.controlboxtoggle.render(); _converse.controlboxtoggle.render();
...@@ -396,7 +395,6 @@ ...@@ -396,7 +395,6 @@
}, },
onControlBoxToggleHidden () { onControlBoxToggleHidden () {
u.refreshWebkit();
this.model.set('closed', false); this.model.set('closed', false);
this.el.classList.remove('hidden'); this.el.classList.remove('hidden');
_converse.emit('controlBoxOpened', this); _converse.emit('controlBoxOpened', this);
......
...@@ -108,7 +108,6 @@ ...@@ -108,7 +108,6 @@
} }
)); ));
this.content = this.el.querySelector('.chat-content'); this.content = this.el.querySelector('.chat-content');
utils.refreshWebkit();
return this; return this;
}, },
......
...@@ -475,7 +475,6 @@ ...@@ -475,7 +475,6 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) { if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
this.showSpinner(); this.showSpinner();
} }
u.refreshWebkit();
return this; return this;
}, },
......
...@@ -11,14 +11,12 @@ ...@@ -11,14 +11,12 @@
define([ define([
"sizzle", "sizzle",
"es6-promise", "es6-promise",
"jquery.browser",
"lodash.noconflict", "lodash.noconflict",
"strophe", "strophe",
], factory); ], factory);
}(this, function ( }(this, function (
sizzle, sizzle,
Promise, Promise,
jQBrowser,
_, _,
Strophe Strophe
) { ) {
...@@ -396,20 +394,6 @@ ...@@ -396,20 +394,6 @@
} }
}; };
u.refreshWebkit = function () {
/* This works around a webkit bug. Refreshes the browser's viewport,
* otherwise chatboxes are not moved along when one is closed.
*/
if (jQBrowser.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';
});
}
};
u.stringToNode = function (s) { u.stringToNode = function (s) {
/* Converts an HTML string into a DOM Node. /* Converts an HTML string into a DOM Node.
* Expects that the HTML string has only one top-level element, * Expects that the HTML string has only one top-level element,
......
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