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({
"form-utils": "src/form-utils",
"i18n": "src/i18n",
"jed": "node_modules/jed/jed",
"jquery.browser": "node_modules/jquery.browser/dist/jquery.browser",
"jquery": "src/jquery-stub",
"lodash": "node_modules/lodash/lodash",
"lodash.converter": "3rdparty/lodash.fp",
"lodash.fp": "src/lodash.fp",
......
......@@ -289,7 +289,6 @@
this.model.on('sendMessage', this.sendMessage, this);
this.render().renderToolbar().insertHeading().fetchMessages();
u.refreshWebkit();
_converse.emit('chatBoxOpened', this);
_converse.emit('chatBoxInitialized', this);
},
......@@ -968,7 +967,6 @@
hide () {
this.el.classList.add('hidden');
u.refreshWebkit();
return this;
},
......
......@@ -386,7 +386,6 @@
return;
}
u.addClass('hidden', this.el);
u.refreshWebkit();
_converse.emit('chatBoxClosed', this);
if (!_converse.connection.connected) {
_converse.controlboxtoggle.render();
......@@ -396,7 +395,6 @@
},
onControlBoxToggleHidden () {
u.refreshWebkit();
this.model.set('closed', false);
this.el.classList.remove('hidden');
_converse.emit('controlBoxOpened', this);
......
......@@ -108,7 +108,6 @@
}
));
this.content = this.el.querySelector('.chat-content');
utils.refreshWebkit();
return this;
},
......
......@@ -475,7 +475,6 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
this.showSpinner();
}
u.refreshWebkit();
return this;
},
......
......@@ -11,14 +11,12 @@
define([
"sizzle",
"es6-promise",
"jquery.browser",
"lodash.noconflict",
"strophe",
], factory);
}(this, function (
sizzle,
Promise,
jQBrowser,
_,
Strophe
) {
......@@ -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) {
/* Converts an HTML string into a DOM Node.
* 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