-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Slow and buggy :active
effects
#3691
Comments
Hello, |
I definitely can reproduce this in |
Hi, I'm using @elibroftw's template and encountered this problem when clicking the buttons. It only happens as long as the mouse stays completely still while clicking and releasing. Move the mouse, and everything continues immediately as expected. |
:active
effects
:active
effects:active
effects
Having the same issue, but it's not specifically related to |
The problem lies in the use of --- a/core/tauri-runtime-wry/src/lib.rs
+++ b/core/tauri-runtime-wry/src/lib.rs
@@ -1978,7 +1978,6 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
self
.event_loop
.run_return(|event, event_loop, control_flow| {
- *control_flow = ControlFlow::Wait;
if let Event::MainEventsCleared = &event {
*control_flow = ControlFlow::Exit;
}
@@ -2527,10 +2526,6 @@ fn handle_event_loop<T: UserEvent>(
#[cfg(all(desktop, feature = "system-tray"))]
system_tray_manager,
} = context;
- if *control_flow != ControlFlow::Exit {
- *control_flow = ControlFlow::Wait;
- }
-
match event {
Event::NewEvents(StartCause::Init) => {
callback(RunEvent::Ready); Which "fixes" the issue, but is less performant. I don't think it's really fixing the underlying issue though, which I am yet to discover... |
Maybe @wusyong can help you. |
There were also 100% cpu usage problems with Poll if i remember it correctly. On the issue itself tho, wasn't this PR tauri-apps/tao#465 created because of this issue? can't remember x) |
Hold on, aren't device events opt-in? You specifically have to register listeners for raw input at least on Windows. |
Yes, this is the one. There are also other place need to refactor a little. |
Should be fixed now in tauri 1.1 |
Describe the bug
In both my own Tauri project and the example project, I am noticing a delay when interacting with buttons with the mouse. Buttons with the default styling sometimes don't immediately change colour when I click down on them or they don't perform their action immediately until I move the mouse after letting go of left click.
This occurs on my laptop and desktop, both of which run Windows. The behaviour is also noticeable with anchor tags and other elements which change their styling or fire an event when the mouse is pressed.
Reproduction
Expected behavior
The button should immediately change its styling when clicking down, and immediately fire an event when letting go.
Platform and versions
Operating System - Windows, version 10.0.19044 X64 Webview2 - 99.0.1150.39 Visual Studio Build Tools: - Visual Studio Community 2019 Node.js environment Node.js - 16.14.0 @tauri-apps/cli - 1.0.0-rc.6 @tauri-apps/api - 1.0.0-rc.2 Global packages npm - 8.3.1 pnpm - Not installed yarn - 1.22.17 Rust environment rustup - 1.24.3 rustc - 1.59.0 cargo - 1.59.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /node_modules /src /src-tauri App tauri - 1.0.0-rc.4 tauri-build - 1.0.0-rc.4 tao - 0.6.4 wry - 0.13.3 build-type - bundle CSP - unset distDir - ../build devPath - http://localhost:3000/ framework - React
Stack trace
No response
Additional context
This also appears to happen to the elements within the Webview2 DevTools window.
The text was updated successfully, but these errors were encountered: