Skip to content

CookieConsent cannot be hidden properly on very small screens #2336

Closed
@lindapaiste

Description

@lindapaiste

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

The positioning of the CookieConsent is always fine when it is visible, as we use bottom: 0 for this.
image

When it's hidden we use bottom: -300px (in rem). Moving the bottom down by exactly 300px will hide the banner if the banner is >= 300px. This is almost always true, even on the vast majority of mobile devices. But using fixed numeric positions is prone to edge case bugs. On a very narrow screen the banner can be taller than 300px due to text wrapping. In that case, part of the banner will always be visible and it's impossible to remove this visible part.
image

Expected Behavior

I expect it to be completely hidden regardless of screen size.

Steps to reproduce

Steps:

  1. Open the web app
  2. Shrink the window

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugError or unexpected behaviorsPriority:LowLow-impact issue that can be addressed after higher-priority tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions