summaryrefslogtreecommitdiffstats
path: root/src/widget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs8
1 files changed, 8 insertions, 0 deletions
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<Message>() -> Command<Message>
+where
+ Message: 'static,
+{
+ Command::widget(operation::focus_previous())
+}
+
/// Focuses the next focusable widget.
pub fn focus_next<Message>() -> Command<Message>
where