User avatar

Jeroen Reumkens PRO

CSS Popover + Anchor API Bug

Unlock Playground Access

Playgrounds let you build, test, and share frontend ideas instantly — right in your browser. Access is included in PRO. Just want Playgrounds? Pick a plan below.

Maker

€5,- / month

Unlimited Playgrounds access to build, experiment, and share without limits.

Join for €5 per month

Champion

€10,- / month

All the benefits of Maker, plus you help Frontend.fyi grow and get a Champion badge on your profile.

Join for €10 per month

Cancel anytime — no commitment.
Upgrade to PRO anytime and get a partial refund.We'll credit 100% of your first 3 months and 50% of the rest toward the PRO lifetime price.

Already a member? Login

Playground settings

Title

Description

Public

Editor settings


Packages

These packages can be imported in your JavaScript files.

Package name

Version

123456789101112131415161718192021222324252627282930
<div class="wrapper">
  <div class="spacer"><h1>Scroll down, the instructions are in the popover. Bug ONLY occurs in Chrome</h1></div>

  <button class="btn1" popovertarget="popover1">
    click me
  </button>

  <div popover="auto" id="popover1">
    <p>Popover1</p>

    <button class="btn2" popoverTarget="popover2">
      click me too
    </button>

    <div popover="auto" id="popover2">
      <p>Popover 2</p>
      <p>Hover the button below. Notice it won't trigger. For it to trigger, you need to move your mouse over the button,
        then move UP on the Y axis (so make sure the X would still be over the button too). 
        It could be you need to scroll slightly back up to find the target.
      </p>
      <p>If you would remove the spacer at the top of the page (and thus the popover wouldn't require scroll), the hover would work straigth away.</p>
      <button class="hover-btn">Hover this button</button>
    </div>

  </div>

  <div class="spacer"></div>
</div>

<script src="index.js"></script>
One sec — editor's thinking…