Skip to content

Commit 260b5d8

Browse files
committed
[css-nav-1] Fix / clean up examples
1 parent 56b68de commit 260b5d8

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

css-nav-1/Overview.bs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,11 @@ Note: the {{focusableAreas()}} and {{getSpatialNavigationContainer()}} methods a
505505

506506
<pre><code highlight=markup>
507507
&lt;body>
508-
&lt;button class="box">&lt;/button>
509-
&lt;div class="container" style="width:300px; height:200px; overflow-x: scroll;">
510-
&lt;button class="box" style="left:25px;">&lt;/button>
511-
&lt;button class="box" style="left:150px;">&lt;/button>
512-
&lt;button class="box" style="left:350px;">&lt;/button>
508+
&lt;button>&lt;/button>
509+
&lt;div style="width:300px; height:200px; overflow-x: scroll;">
510+
&lt;button style="left:25px;">&lt;/button>
511+
&lt;button style="left:150px;">&lt;/button>
512+
&lt;button style="left:350px;">&lt;/button>
513513
&lt;/div>
514514
&lt;/body>
515515
</code></pre>
@@ -559,7 +559,7 @@ and the result will be <code>null</code>.</strong>
559559
while (target.isSameNode(target.getSpatialNavigationContainer())) {
560560
const areas = target.focusableAreas();
561561

562-
if (areas.length === 0) { target.navigate(e.dir); }
562+
if (areas.length === 0) { break; }
563563

564564
target = target.spatialNavigationSearch({
565565
dir: e.dir,
@@ -1390,18 +1390,18 @@ the proper spatial navigation behavior.
13901390
<div class=example>
13911391
In this example, a scrollable container is specified with <code highlight=css>spatial-navigation-action: focus</code>.
13921392
Inside the container, there is an element which is out of the view within a <a>scrollport</a>.
1393-
Pressing the right arrow key moves the focus directly to it without scrolling manually.
1393+
Pressing the down arrow key moves the focus directly to it without scrolling manually.
13941394

13951395
<figure>
13961396
<img alt="" src="images/spatnav-action.png" style="width: 500px;"/>
13971397
<figcaption>Moving focus from "Box 2" to "Box 3" without manually scrolling</figcaption>
13981398
</figure>
13991399

14001400
<pre><code highlight=markup>
1401-
&lt;div class = 'scroller'>
1402-
&lt;button class = 'item'>Box 1&lt;/button>
1403-
&lt;button class = 'item'>Box 2&lt;/button>
1404-
&lt;button class = 'item'>Box 3&lt;/button>
1401+
&lt;div class='scroller'>
1402+
&lt;button class='item'>Box 1&lt;/button>
1403+
&lt;button class='item'>Box 2&lt;/button>
1404+
&lt;button class='item'>Box 3&lt;/button>
14051405
&lt;/div>
14061406
</code></pre>
14071407
<pre><code highlight=css>

css-nav-1/images/spatnav-action.png

3.39 KB
Loading

0 commit comments

Comments
 (0)