Skip to content

Commit 91afd4b

Browse files
cmyrluleyleo
andauthored
Update druid/src/widget/textbox.rs
Co-authored-by: Leopold Luley <git@leopoldluley.de>
1 parent 27729cf commit 91afd4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

druid/src/widget/textbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ impl<T: TextStorage + EditableText> Widget<T> for TextBox<T> {
269269
self.editor.set_text(data.to_owned());
270270
self.editor.rebuild_if_needed(ctx.text(), env);
271271
}
272-
LifeCycle::FocusChanged(_is_focused) => {
273-
#[cfg(target_os = "macos")]
274-
if *_is_focused && !self.was_focused_from_click {
272+
LifeCycle::FocusChanged(is_focused) => {
273+
if cfg!(target_os = "macos") && *is_focused && !self.was_focused_from_click {
275274
self.editor.select_all(data);
276275
}
277276
self.was_focused_from_click = false;

0 commit comments

Comments
 (0)