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] The drop-down menu of "select" item does not change the position as the application window moves #5135

Closed
Arkinux opened this issue Sep 5, 2022 · 1 comment · Fixed by tauri-apps/wry#695

Comments

@Arkinux
Copy link

Arkinux commented Sep 5, 2022

Describe the bug

I run the 'Navigation' example and click “select” item to bring up the drop-down menu:
图片

however, after I moved the application window, the drop-down menu remained in its original position:
图片

Reproduction

1、run the 'Navigation' example and click “select” item to bring up the drop-down menu:
图片

2、after I moved the application window, the drop-down menu remained in its original position:
图片

Expected behavior

No response

Platform and versions

Environment
› OS: Windows 10.0.22000 X64
› Webview2: 105.0.1343.25
› MSVC:
- Visual Studio Community 2022
› Node.js: 16.14.0
› npm: 8.3.1
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.24.3
› rustc: 1.61.0
› cargo: 1.61.0
› Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
› @tauri-apps/cli [NPM]: 1.0.3
› @tauri-apps/api [NPM]: 1.0.1 (outdated, latest: 1.0.2)
› tauri [RUST]: 1.0.2,
› tauri-build [RUST]: 1.0.2,
› tao [RUST]: 0.12.1,
› wry [RUST]: 0.19.0,

App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: ../dist

App directory structure
├─ dist
├─ node_modules
└─ src-tauri

Stack trace

No response

Additional context

No response

@Arkinux Arkinux added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 5, 2022
@FabianLars FabianLars added status: upstream platform: Windows and removed status: needs triage This issue needs to triage, applied to new issues labels Sep 5, 2022
@FabianLars
Copy link
Member

This is a upstream bug in WebView2. The only official-ish workaround (on our side) is to focus the webview when the window moves but for whatever reason that didn't work for us.
So the only thing left until it's fixed upstream (it was reported 2 years ago btw) it to manually blur the element when the window moves. Here's a React example, i hope it's translatable to vanillajs: https://github.com/FabianLars/mw-toolbox/blob/main/gui/src/components/forms/Select/Select.tsx#L33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants