O
O
Orc2019-11-09 13:26:26
JavaScript
Orc, 2019-11-09 13:26:26

The chat window increases in height on startup. js bug?

Good time!
I have js-code Live helper Chat to insert into the page, without alterations - as it is.

var LHCChatOptionsPage = {'height':'300','mobile':false};
LHCChatOptionsPage.opt = {};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src =  '//<ссылка на сайт>/chat/index.php/chat/getstatusembed/(hide_offline)/true/(operator)/1?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

At startup, there is a bug - the chat increases in height to a certain size, then this process stops.
5dc28414194d0367259525.png
Recorded a video and posted it here .
Where to dig, tell me. Maybe someone came across.
In the screenshot, I circled the height value, which increases.
5dc69c6570352926430639.png
the height is hardcoded in the tpl template of the loaded chat, so where does it come from
5dc6a29076fd0913929626.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lev Zabudkin, 2020-01-17
@zabudkin

There are such wonderful letters as !important
Here, add this magic word with an exclamation mark in front to the end:
it will be 292px !important

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question