From 6eb3dd7e5edc8847875c288c41d1dec8b1dad06e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 4 Aug 2022 03:24:44 +0200 Subject: Implement `focus_previous` operation --- src/widget.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widget.rs') diff --git a/src/widget.rs b/src/widget.rs index 2333aa28..c3b6d83b 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -215,6 +215,14 @@ pub use svg::Svg; use crate::Command; use iced_native::widget::operation; +/// Focuses the previous focusable widget. +pub fn focus_previous() -> Command +where + Message: 'static, +{ + Command::widget(operation::focus_previous()) +} + /// Focuses the next focusable widget. pub fn focus_next() -> Command where -- cgit