Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>ally.fix.pointerFocusChildren Example</title>
</head>
<body>
<article id="example-introduction">
  <h1><code>ally.fix.pointerFocusChildren</code> Example</h1>
  <p>There are two focusable div elements in this document, each containing two span element children layed out using FlexBox. The first div element exhibits the undesired behavior upon click, the second div element is covered by <code>ally.fix.pointerFocusChildren</code>.</p>
</article>
<div id="example-html">
  <main>
    <h2>Natural Browser Behavior</h2>
    <div tabindex="-1" class="flex">
      <span>one</span>
      <span>two</span>
    </div>
    <h2>Fixed Behavior</h2>
    <div tabindex="-1" id="fix-pointer-focus" class="flex">
      <span>one</span>
      <span>two</span>
    </div>
  </main>
</div>
<script src="https://cdn.jsdelivr.net/ally.js/1.4.1/ally.min.js"></script>
</body>
</html>
 
ally.fix.pointerFocusChildren({
  context: '#fix-pointer-focus',
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
rodneyrehmpro
0viewers