Fix input example (#24165)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-02-03 22:09:45 -07:00 committed by GitHub
parent daf09fa532
commit 225f0c4d12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -697,7 +697,7 @@ fn main() {
},
)
.unwrap();
let view = window.root(cx).unwrap();
let view = window.update(cx, |_, _, cx| cx.entity()).unwrap();
cx.observe_keystrokes(move |ev, _, cx| {
view.update(cx, |view, cx| {
view.recent_keystrokes.push(ev.keystroke.clone());