Skip to content

Commit 6d33fcf

Browse files
author
Jihye Hong
authored
[css-nav-1] Update the explainer
1 parent 909e8fb commit 6d33fcf

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

css-nav-1/explainer.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -195,30 +195,9 @@ element of the author's choosing.
195195
* navbeforefocus
196196
- Occurs before spatial or sequential navigation changes the focus.
197197

198-
* navbeforescroll
199-
- Occurs before spatial navigation triggers scrolling.
200-
201198
* navnotarget
202199
- Occurs before going up the tree to search candidates in the nearest ancestor spatial navigation focus container when spatial navigation has failed to find any candidate within the current spatial navigation focus container.
203200

204-
#### Example
205-
The following code changes the behavior of spatial navigation from scrolling when there is no focusable element visible, to jumping to focusable elements even when they are not visible.
206-
```js
207-
document.addEventListener("navbeforescroll", function(e) {
208-
var container = e.relatedTarget;
209-
var areas = container.focusableAreas({ mode: "all" });
210-
211-
if (areas.length == 0)) { return; }
212-
213-
e.preventDefault();
214-
var t = e.target.spatialNavigationSearch({
215-
dir: e.dir,
216-
candidates: areas
217-
});
218-
t.focus();
219-
});
220-
```
221-
222201
## FAQ
223202

224203
### Why do you say that there is no such thing as "the order" in a visual document?

0 commit comments

Comments
 (0)