mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 11:13:40 +03:00
chore: add note about focusing the webview (#2545)
This commit is contained in:
parent
774b8a1df7
commit
ad17b9bf2a
@ -1927,6 +1927,8 @@ fn handle_event_loop(
|
||||
Event::WindowEvent {
|
||||
event, window_id, ..
|
||||
} => {
|
||||
// NOTE(amrbashir): we handle this event here instead of `match` statement below because
|
||||
// we want to focus the webview as soon as possible, especially on windows.
|
||||
if event == WryWindowEvent::Focused(true) {
|
||||
if let Some(WindowHandle::Webview(webview)) = windows.get(&window_id).map(|w| &w.inner) {
|
||||
webview.focus();
|
||||
|
Loading…
Reference in New Issue
Block a user