K
K
Kristina87872020-12-29 20:40:03
JavaScript
Kristina8787, 2020-12-29 20:40:03

Why does BX24.resizeWindow not work correctly?

Hello. I have such a problem, in the application in Bitrix a vertical scroll appeared in the frame, I found how to remove it, I registered such methods

application.prototype.resizeFrame = function (){
    var currentSize = BX24.getScrollSize();
  minHeight = currentSize.scrollHeight;
  if (minHeight < 400) minHeight = 400;
    BX24.resizeWindow(this.FrameWidth, minHeight);
};

application.prototype.saveFrameWidth = function () {
    this.FrameWidth = document.getElementById("app").offsetWidth;
    
}


then, when the application is initialized, I call saveFrameWidth, and after any method that replenishes or removes content from the page, I call resizeFrame, the method works, but not completely, there are approximately 40 pixels left that need to be scrolled with this same vertical scroll from which I wanted to get rid of, i.e. . if earlier they had to scroll about 3 thousand pixels, now it’s about 40, inserting the method of resizing the frame into all methods that are not even related to adding or removing content from the page does not help. I manually added +200 to minheight in the resizeWindow method, I get only the footer that has risen under which these same 200 pixels and the same scroll on the right. Tell me what I'm doing wrong

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2020-12-30
@gromdron

The resizeWindow method with css frameworks has the same problems as fitWindow - i.e. they are great at increasing the size of the frame, but they are quite bad at reducing it (often not at all).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question