dioxus
dioxus copied to clipboard
DesktopConfig.with_event_handler is unused
DesktopConfig.with_event_handler
sets the event_handler
field, but that isn't used anywhere:
> grep -r 'event_handler' packages/desktop/
packages/desktop/src/cfg.rs: pub(crate) event_handler: Option<Box<DynEventHandlerFn>>,
packages/desktop/src/cfg.rs: event_handler: None,
packages/desktop/src/cfg.rs: pub fn with_event_handler(
packages/desktop/src/cfg.rs: self.event_handler = Some(Box::new(handler));
Would be nice to install an application-wide keypress handler.
If I understand correctly, it's for window events such as "minimize" or "close", etc. I think it should just be removed until such functionality is implemented.
Would be nice to install an application-wide keypress handler.
You can probably add this on some wrapper for the whole document if needed.
Well, when I tried to use onkeydown
on the top level rsx
macro, it complained about an unexpected token.
wrap it in a div
or similar. only elements can have attributes.
Will that work even if the window is focused by, say, clicking on the titlebar?