Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] outerPosition/outerSize return inaccurate dimensions for WebviewWindow #11565

Closed
dgerhardt opened this issue Nov 1, 2024 · 1 comment
Closed
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@dgerhardt
Copy link

Describe the bug

The outerPosition/outerSize methods of WebviewWindow (I've only tested the JS API) return inaccurate values for y on Linux/X11 and height on Windows.

In both cases the deviation seems to be around the size of the title bar.

Reproduction

  1. Retrieve the WebviewWindow's dimensions using outerPosition and outerSize JS API methods.
  2. Update the WebviewWindow's dimensions using setPosition and setSize JS API methods.
  3. Retrieve the WebviewWindow's dimensions again.

Observed behavior: The WebviewWindows y (Linux) or height (Windows) values returned are larger than expected.

Reproduction repository: https://github.com/dgerhardt/tauri-app-inaccurate-outer-dimensions

Expected behavior

outerPosition and outerSize should return accurate dimensions of the window.

Full tauri info output

[✔] Environment
    - OS: Ubuntu 24.4.0 x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.44.0
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.18.0
    - yarn: 1.22.19
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.46.3
    - tao 🦀: 0.30.5
    - @tauri-apps/api : 2.0.3
    - @tauri-apps/cli : 2.0.5

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - bundler: Vite

Stack trace

No response

Additional context

Related issue: #11510

@dgerhardt dgerhardt added status: needs triage This issue needs to triage, applied to new issues type: bug labels Nov 1, 2024
@dgerhardt
Copy link
Author

Closing for now. I'll wait for tauri-apps/tao#1001 to be merged and will reopen if the issue on Windows remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

1 participant