From d0e17aad77bd54e070d2a6dc409ee9144c3e24bf Mon Sep 17 00:00:00 2001 From: skylartaylor Date: Mon, 23 Nov 2026 15:02:35 +0100 Subject: [PATCH] Format --- crates/ui-contract/src/contract/text.rs | 6 +----- crates/ui-contract/tests/it/collection/rows.rs | 4 ++-- crates/ui-widgets/tests/it/text/text_field.rs | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/ui-contract/src/contract/text.rs b/crates/ui-contract/src/contract/text.rs index a1181a4752..dcd8dffb69 100644 --- a/crates/ui-contract/src/contract/text.rs +++ b/crates/ui-contract/src/contract/text.rs @@ -588,11 +588,7 @@ pub(crate) fn run( } } let resolved = resolve(&mut state, cx.value(), commit_now); - let keeps_escape = part.options.keep_on_escape - && !part.options.clear_on_escape - && !read_only - && cx.core.resolved.enabled - && part.options.enabled; + let keeps_escape = part.options.keep_on_escape && !part.options.clear_on_escape && !read_only && cx.core.resolved.enabled && part.options.enabled; if resolved.escaped && keeps_escape && !state.invalid { // The same Escape goes on to the enclosing scope in this pass, which still finds this focused stop; the field // lets focus go once the scopes have run. diff --git a/crates/ui-contract/tests/it/collection/rows.rs b/crates/ui-contract/tests/it/collection/rows.rs index 0e4c4915af..28127708dd 100644 --- a/crates/ui-contract/tests/it/collection/rows.rs +++ b/crates/ui-contract/tests/it/collection/rows.rs @@ -3,8 +3,8 @@ use super::kit::{Count, Dismissed, List, ROW_H, RowOut, Words}; use craft_behavior::{ - CancelReason, CellAt, CellRange, CellSelection, ColumnKey, EditEvent, EditEvents, ItemSource, PartKey, ScrollPos, Selection, SelectionModel as _, Sense, - SheetLayout, SpanLayout, keyed, + CancelReason, CellAt, CellRange, CellSelection, ColumnKey, EditEvent, EditEvents, ItemSource, PartKey, ScrollPos, Selection, SelectionModel as _, + Sense, SheetLayout, SpanLayout, keyed, }; use craft_ui::contract::{ Bind, BindMut, Collection, CollectionEvent, CollectionProps, CollectionResponse, Common, Component, ContainerProps, Cx, EditResponse, Focus as _, diff --git a/crates/ui-widgets/tests/it/text/text_field.rs b/crates/ui-widgets/tests/it/text/text_field.rs index a596f945b0..ac545ee555 100644 --- a/crates/ui-widgets/tests/it/text/text_field.rs +++ b/crates/ui-widgets/tests/it/text/text_field.rs @@ -215,7 +215,6 @@ fn a_bound_caret_moves_the_caret_and_follows_it() { assert_eq!(caret.get(), 4, "the user's caret move past the two-byte \"é\" writes its byte offset back"); } - /// A field that keeps its text on Escape (`keeps_on_escape`, a live filter's query) commits the typing, lets focus /// go and leaves the same Escape to its enclosing scope; it reports the focus loss as `text_lost_focus`. #[trial]