-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX Tab change input field focus breaks rendering #2367
Comments
This is reproducible by clicking between two input fields. The issue arises in 0.8.0. My issue is not reproducible in 0.7 See this video: https://github.com/linebender/druid/assets/61894094/a3edb4dc-c403-40e5-9414-d2658d6ee725 Repro code: use std::sync::Arc;
use druid::{
widget::{prelude::*, Flex, SizedBox, TextBox},
AppLauncher, Color, Lens, LocalizedString, WidgetExt, WindowDesc,
};
fn launch<T: Data, W: Widget<T> + 'static>(make_ui: fn() -> W, data: T) {
let main_window = WindowDesc::new(make_ui())
.title(LocalizedString::new("learning the basics").with_placeholder("Hello world!"));
AppLauncher::with_window(main_window).launch(data).unwrap();
}
#[derive(Clone, Data, Lens)]
struct AppState {
name: Arc<String>,
dog_name: Arc<String>,
}
fn main() {
let ui = || {
Flex::column()
.with_child(
TextBox::new()
.with_placeholder("What is your name?")
.fix_width(200.0)
.lens(AppState::name),
)
.with_child(SizedBox::empty().height(300.))
.with_child(
TextBox::new()
.with_placeholder("What is your dog's name?")
.fix_width(200.0)
.lens(AppState::dog_name),
)
.background(Color::GREEN)
};
launch(
ui,
AppState {
name: Arc::new("".to_string()),
dog_name: Arc::new("".to_string()),
},
);
} |
I managed to also reproduce it on my macOS Catalina 10.15, using the Definitely a bug that should be resolved. |
Yes I will try to do that soon. Confirming the bug was the first step in that process. 👍 |
When using tab to change focus to next input element it breaks rendering in OSX.
Normal clicking to elements don't break it.
Commit:
c02452ddeebc527992e8f112f434f23ce24c934d
System info
Steps to Reproduce
git clone https://github.com/linebender/druid
cd druid/druid
cargo run --example flex
The text was updated successfully, but these errors were encountered: