mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 20:43:19 +01:00
Format
This commit is contained in:
1 parent
a4d790cdcf
commit
d0e17aad77
3 files changed
+3
-8
No files matched your search
@@ -588,11 +588,7 @@ pub(crate) fn run<C: Component>(
|
||||
}
|
||||
}
|
||||
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.
|
||||
|
||||
@@ -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 _,
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user