chrome extension, popup window's height

前端 未结 4 1560
庸人自扰
庸人自扰 2021-02-01 15:08

It seems to me that the popup window\'s height has a limit of 489 pixels. If I\'m setting the body element of the popup to 600 pixels of height, then popup window gets a scroll

4条回答
  •  臣服心动
    2021-02-01 15:25

    The popup window for chrome extensions has a maximum height and width. That is why the solution to set the height of body and html elements does work in some cases, and does not work in others. For Windows, the max height seems to be set to 489 pixels.

    Additionally, the size of the popup does generally fit the size of its (relatively positioned) elements. This is also the case if the DOM of the popup is dynamically changed. So, setting the height for the popup window should usually not be nessecary.

提交回复
热议问题