Fixed the definition of the width of the observed element when receiving the scrollbar.
Initially, the availWidth
property of the screen
object was used, but the problem is that the value of this property does not change when the browser width changes. Therefore, it was decided to replace it with innerWidth
.