From 62b795d472497550707c79408f6c483c38e2a363 Mon Sep 17 00:00:00 2001 From: Atterpac <89053530+atterpac@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:47:18 -0700 Subject: [PATCH] fix resize messaging (#3606) changelog.md --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/webview_window.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index dcdb0583b..f062dbc08 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed resize event messaging by [atterpac](https://github.com/atterpac) in [#3606](https://github.com/wailsapp/wails/pull/3606) - [linux] Fixed theme handling error on NixOS by [tmclane](https://github.com/tmclane) in [#3515)(https://github.com/wailsapp/wails/pull/3515) - Fixed cross volume project install for windows by [atterpac](https://github.com/atterac) in [#3512](https://github.com/wailsapp/wails/pull/3512) - Fixed react template css to show footer by [atterpac](https://github.com/atterpac) in [#3477](https://github.com/wailsapp/wails/pull/3477) diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index 37320eb9b..c26e5c0b4 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -659,11 +659,11 @@ func (w *WebviewWindow) HandleMessage(message string) { case strings.HasPrefix(message, "wails:resize:"): if !w.IsFullscreen() { sl := strings.Split(message, ":") - if len(sl) != 2 { - w.Error("Unknown message returned from dispatcher: %+v", message) + if len(sl) != 3 { + w.Error("Unknown message returned from dispatcher", "message", message) return } - err := w.startResize(sl[1]) + err := w.startResize(sl[2]) if err != nil { w.Error(err.Error()) }