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] cannot fix the position of a webview and set auto_resize at the same time #9611

Open
seb-hernandez opened this issue Apr 30, 2024 · 0 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@seb-hernandez
Copy link

seb-hernandez commented Apr 30, 2024

Describe the bug

I create a webview and add it to my main window. I set a LogicalPosition to be cero in the horizontal axis, and an offset in the vertical axis. Finally I set auto_resize. With this config, the webview is not fixed on the vertical axis as I resize the window. However, If I remove the auto_resize, the webview is now fixed.

window.add_child(
    WebviewBuilder::new(label, WebviewUrl::External(url)).auto_resize(), 
    LogicalPosition::new(0, offset),
    window.inner_size().unwrap(),
)

Reproduction

No response

Expected behavior

Webview position should be fixed in the vertical axis and it is resizable.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.3.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.20.2
    - pnpm: 9.0.2
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.15
    - tauri-build [RUST]: 2.0.0-beta.12
    - wry [RUST]: 0.39.1
    - tao [RUST]: 0.27.0
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../../dist/apps/exam-web
    - devUrl: http://localhost:3000/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

auto_resize:
https://github.com/tauri-apps/tauri/assets/46209454/833ce09d-d2c2-46ff-928f-3620ee5604e3

No auto_resize:
https://github.com/tauri-apps/tauri/assets/46209454/bd06caa4-ede7-415d-a0b3-736287add084

@seb-hernandez seb-hernandez added status: needs triage This issue needs to triage, applied to new issues type: bug labels Apr 30, 2024
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