winbox icon indicating copy to clipboard operation
winbox copied to clipboard

The default value of `maxwidth` / `maxheight` can be set to a very large number rather than the size of viewport

Open RickoNoNo3 opened this issue 1 year ago • 2 comments

in v0.2.6, a winbox without special configurations will take the calculation results of the viewport as maxwidth and maxheight attributes. We assume that its size is unlimited and is just supposed to stay in the viewport. But when the browser is resized(especially enlarged), these two attributes can not be updated automatically, and will cause bugs--the winbox will have an unexpected size limit--the size of the old viewport.

After my test, it works well to assign a very large number that is larger than any browser's size by default to these attributes. In such situation, the size of winbox is still limited within the area we agreed because of the top/right/bottom/left limiting mechanism. And it can perfectly solve the above problem.

RickoNoNo3 avatar Jan 01 '23 15:01 RickoNoNo3