#[repr(C)]pub enum StyleSpatialNavigationAction {
Auto = 0,
Focus = 1,
Scroll = 2,
}Expand description
spatial-navigation-action - what an arrow key does on a scroll container.
.map { spatial-navigation-action: scroll; } /* arrows always pan */
.menu { spatial-navigation-action: focus; } /* arrows never scroll */The default is Auto, which is the ordered fallback 9a-i-a
implements: move focus if there is somewhere to move it, otherwise scroll.
NOT INHERITED. The property answers “what does an arrow do when THIS
element is the scroll container”, and a container that pans is routinely
full of ordinary focusable controls that must keep behaving normally -
inheriting scroll into them would make every button inside a map
unreachable by keyboard.
Variants§
Auto = 0
Move focus if a candidate lies in that direction; otherwise scroll.
Focus = 1
Always move focus. If there is no candidate the container does NOT scroll - the search continues outward instead, so an arrow at the edge of a menu escapes it rather than nudging it.
Scroll = 2
Always scroll, changing nothing about focus, even when focusable children are sitting right there. What a map, a canvas or a code editor wants.
Trait Implementations§
Source§fn clone(&self) -> StyleSpatialNavigationAction
fn clone(&self) -> StyleSpatialNavigationAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more