Answered
How disable scrollbar when `embedMode: "FULL_WINDOW"`?
How disable scrollbar when `embedMode: "FULL_WINDOW"`?
How disable scrollbar when `embedMode: "FULL_WINDOW"`?
It is impossible to hide the scrollbar, but you can get the scrollbar size and count it:
function getScrollbarWidth () {
// Creating invisible container
const outer = document.createElement('div');
outer.style.visibility = 'hidden';
outer.style.overflow = 'scroll'; // forcing scrollbar to appear
outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
document.body.appendChild(outer);
// Creating inner element and placing it in the container
const inner = document.createElement('div');
outer.appendChild(inner);
// Calculating difference between container's full width and the child width
const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth);
// Removing temporary elements from the DOM
outer.parentNode.removeChild(outer);
return scrollbarWidth;
}Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.