The refreshWebkit hack appears to no longer be necessary

This commit is contained in:
JC Brand 2018-01-04 12:09:51 +00:00
parent 4652385bb4
commit 199e2e7e27
7 changed files with 1 additions and 24 deletions

View File

@ -53,7 +53,6 @@
"jasmine-core": "2.6.4",
"jed": "0.5.4",
"jquery": "2.2.3",
"jquery.browser": ">=0.1.0",
"jshint": "^2.9.4",
"lodash": "4.17.4",
"lodash-template-loader": "^2.0.0",

View File

@ -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",

View File

@ -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;
},

View File

@ -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);

View File

@ -108,7 +108,6 @@
}
));
this.content = this.el.querySelector('.chat-content');
utils.refreshWebkit();
return this;
},

View File

@ -475,7 +475,6 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
this.showSpinner();
}
u.refreshWebkit();
return this;
},

View File

@ -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,