Plugin scrollbar behaviour
This may be a general js question but I haven't found a solution yet: I would like to make the vertical scrollbar always visible because when its sudden appearance shifts everything. I know that
overflow-y: scroll;
does this, but I don't know which container I should apply this on.
Furthermore, I use a spinner and disable the plugin UI when performing an action, like this:
globals.container.find('.btn-file')[0].innerHTML = '';
globals.container.find('.btn-file')[0].insertAdjacentHTML('beforeend', '<span class="loadingspinner spinner-border spinner-border-sm"></span>');
$("#plugincontainer").addClass("disabledbutton");
analyze().then(r =>
{
enablebtn();
}).catch(error => {
alert(error);
enablebtn();
});
function enablebtn() {
var btn = document.getElementById("analyzebtn");
if (btn.childNodes.length > 0)
btn.removeChild(btn.childNodes[0]);
btn.innerHTML = 'Analyze';
$("#plugincontainer").removeClass("disabledbutton");
}
.disabledbutton {
pointer-events: none;
opacity: 0.4; }
However, right before finishing, suddenly a second vertical scrollbar appears for half a second and shifts the plugin content.
Do you know why?