The refreshWebkit
hack appears to no longer be necessary
This commit is contained in:
parent
4652385bb4
commit
199e2e7e27
@ -53,7 +53,6 @@
|
|||||||
"jasmine-core": "2.6.4",
|
"jasmine-core": "2.6.4",
|
||||||
"jed": "0.5.4",
|
"jed": "0.5.4",
|
||||||
"jquery": "2.2.3",
|
"jquery": "2.2.3",
|
||||||
"jquery.browser": ">=0.1.0",
|
|
||||||
"jshint": "^2.9.4",
|
"jshint": "^2.9.4",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
"lodash-template-loader": "^2.0.0",
|
"lodash-template-loader": "^2.0.0",
|
||||||
|
@ -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 @@
|
|||||||
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 @@
|
|||||||
|
|
||||||
hide () {
|
hide () {
|
||||||
this.el.classList.add('hidden');
|
this.el.classList.add('hidden');
|
||||||
u.refreshWebkit();
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -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 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
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 @@
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
this.content = this.el.querySelector('.chat-content');
|
this.content = this.el.querySelector('.chat-content');
|
||||||
utils.refreshWebkit();
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
16
src/utils.js
16
src/utils.js
@ -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 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user