alphagov / govuk-browser-extension

Chrome and Firefox extension for developers working on GOV.UK.
22 stars 5 forks source link

Attempt to force a scrollbar when the extension doesn't fit on screen #103

Closed tijmenb closed 6 years ago

tijmenb commented 6 years ago

Someone in the content team wants to use the extension but uses screen magnification. This causes the extension window to fall off the screen. Because the height is set you can't scroll.

image

This PR attempts to remedy the issue by setting the height of the extension if the user's browser window is lower than 600 (the max height of the popup).

We now gain a scrollbar on the popup but that's an acceptable price to pay.

Before

screen shot 2018-03-06 at 15 38 48

After

screen shot 2018-03-06 at 15 38 46