File tree Expand file tree Collapse file tree
core/tauri-runtime-wry/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : " patch:bug"
3+ " tauri-runtime-wry " : " patch"
4+ ---
5+
6+ On macOS, set default titlebar style to ` Visible ` to prevent webview move out of the view.
Original file line number Diff line number Diff line change @@ -715,7 +715,20 @@ unsafe impl Send for WindowBuilderWrapper {}
715715impl WindowBuilderBase for WindowBuilderWrapper { }
716716impl WindowBuilder for WindowBuilderWrapper {
717717 fn new ( ) -> Self {
718- Self :: default ( ) . focused ( true )
718+ #[ allow( unused_mut) ]
719+ let mut builder = Self :: default ( ) . focused ( true ) ;
720+
721+ #[ cfg( target_os = "macos" ) ]
722+ {
723+ // TODO: find a proper way to prevent webview being pushed out of the window.
724+ // Workround for issue: https://github.com/tauri-apps/tauri/issues/10225
725+ // The window requies `NSFullSizeContentViewWindowMask` flag to prevent devtools
726+ // pushing the content view out of the window.
727+ // By setting the default style to `TitleBarStyle::Visible` should fix the issue for most of the users.
728+ builder = builder. title_bar_style ( TitleBarStyle :: Visible ) ;
729+ }
730+
731+ builder
719732 }
720733
721734 fn with_config ( config : & WindowConfig ) -> Self {
You can’t perform that action at this time.
0 commit comments