Add fullscreen class when applicable

This commit is contained in:
JC Brand 2018-01-23 14:47:46 +01:00
parent e6d5631452
commit 834866bd84

View File

@ -396,8 +396,12 @@
if (_.isNull(el)) { if (_.isNull(el)) {
el = document.createElement('div'); el = document.createElement('div');
el.setAttribute('id', 'conversejs'); el.setAttribute('id', 'conversejs');
if (_.includes(['mobile', 'fullscreen'], _converse.view_mode)) {
el.classList.add('fullscreen');
}
// Converse.js expects a <body> tag to be present. // Converse.js expects a <body> tag to be present.
document.querySelector('body').appendChild(el); document.querySelector('body').appendChild(el);
} }
el.innerHTML = ''; el.innerHTML = '';
this.setElement(el, false); this.setElement(el, false);