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] Webview does not receive keyboard events until user interaction #5464

Closed
alllex opened this issue Oct 22, 2022 · 2 comments
Closed

[bug] Webview does not receive keyboard events until user interaction #5464

alllex opened this issue Oct 22, 2022 · 2 comments
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@alllex
Copy link

alllex commented Oct 22, 2022

Describe the bug

My use case is to be able to use keyboard shortcuts after the app has started and the window is opened. However, this does not work until the user interacts with the window. The only interaction that enables the keyboard handling seems to be the mouse click within the window.

This problem seems to apply to the keyboard events not being propagated into the webview. Because using the regular browser keyboard events does not work, such as pressing Space key to scroll the page down.

Reproduction

  1. Start a Tauri app that opens a window that is vertically scrollable (any window with long enough content)
  2. Press "Space" key after the window has opened

Expected behavior

The "Space" keyboard event is propagated to the webview and the view is scrolled down.

Platform and versions

Environment
  › OS: Mac OS 12.5.0 X64
  › Node.js: 18.0.0
  › npm: 8.19.2
  › pnpm: 7.0.1
  › yarn: 1.22.19
  › rustup: 1.24.3
  › rustc: 1.64.0
  › cargo: 1.64.0
  › Rust toolchain: stable-x86_64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.1.1
  › @tauri-apps/api [NPM]: 1.1.0
  › tauri [RUST]: 1.1.1,
  › tauri-build [RUST]: 1.1.1,
  › tao [RUST]: 0.14.0,
  › wry [RUST]: 0.21.1,

Stack trace

No response

Additional context

No response

@alllex alllex added status: needs triage This issue needs to triage, applied to new issues type: bug labels Oct 22, 2022
@alllex
Copy link
Author

alllex commented Oct 22, 2022

This can be related to #3654

@amrbashir
Copy link
Member

fixed in tauri-apps/wry#740

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

No branches or pull requests

2 participants