You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating your window in Tauri with the following code :
fnopen_main_window(handle:&App) -> WebviewWindow{let main_window = WebviewWindowBuilder::new(handle,"main",WebviewUrl::App("index.html".into())).title("test").resizable(true).fullscreen(false).min_inner_size(650.00,500.00).decorations(true).inner_size(1280.00,800.00).build().expect("Error building main window.");
main_window.open_devtools();return main_window;}
When the app starts and the window appears, resizing the window to be taller than it is wide and snapping it to a section of the screen with the developer console taking up most of the height will cause the Webview to move off-screen. The issue persists until the app is terminated in the terminal.
However, this does not happen when the window is created in the tauri.conf.js file.
tance77
changed the title
[bug] Tauri v2 MacOS Snap to Screen Section / Magnet Bug tauri.conf.json vs creating your own window in rust
[bug] Tauri v2 MacOS: Window Snapping Discrepancies (Configuration vs Custom Rust Windows)
Jul 9, 2024
tance77
changed the title
[bug] Tauri v2 MacOS: Window Snapping Discrepancies (Configuration vs Custom Rust Windows)
[bug] Tauri v2 MacOS: Window Snapping Issue (Configuration vs Custom Rust Windows)
Jul 9, 2024
tance77
changed the title
[bug] Tauri v2 MacOS: Window Snapping Issue (Configuration vs Custom Rust Windows)
[bug] Tauri v2 MacOS: Window Snapping Issue tauri.conf.json vs Custom Rust Windows
Jul 9, 2024
Hi! I am able to fix the issue by setting window_builder.title_bar_style(tauri::TitleBarStyle::Visible).build(). Could you try this one with your WebviewWindowBuilder?
If this works, maybe we should set the value by default.
I don't actually know what happened 👀 . I found that's the difference when creating the window by config. It sometimes depends on how the OS manages the underlying logic, and it's usually a black box.
Describe the bug
When creating your window in Tauri with the following code :
When the app starts and the window appears, resizing the window to be taller than it is wide and snapping it to a section of the screen with the developer console taking up most of the height will cause the Webview to move off-screen. The issue persists until the app is terminated in the terminal.
However, this does not happen when the window is created in the
tauri.conf.js
file.Minimal reproduction repository
https://github.com/tance77/tauri-v2-mac-os-snap-bug
I also think this issue is related as well
#6927
Demo Video
Screen.Recording.2024-07-08.at.4.13.44.PM.mov
Full
tauri info
outputThe text was updated successfully, but these errors were encountered: