question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inputs lose state on quick interactions (or on slow networks)

See original GitHub issue

Qwik Version

0.0.42

Operating System (or Browser)

macOS Monterey (Chrome v.104) and Ubuntu 20.04 LTS (Chromium v.104)

Node Version (if applicable)

No response

Which component is affected?

Qwik Runtime

Expected Behaviour

When interacting with inputs the text typed into them should persist but if the user is fast enough and the network is slow the text can actually be completely (or partially) removed.

Actual Behaviour

You can see in this stackblitz reproduction that if you type quickly enough in the first input and switch into the second and keep typing, the text typed into the second input gets removed.

For example see the following gif: qwik-issue

There I am typing three ones (111) in both inputs, but as you can see 2 1s in the second input just disappear (but you do need to be quite fast to trigger the bug).

That is the best reproduction I could do on stackblitz, there the issue is difficult to reproduce since their web containers don’t allow you to throttle the network (and serve the js files instantaneously via service workers), but if you run the reproduction locally the issue is very easy to reproduce (and it shows more clearly how this can be an issue with the user experience): qwik-local-repro

(naturally in the second gif I am not deleting the text myself, it is getting remove as soon as the core.mjs file is downloaded)

Additional Information

I’m sorry if this is a minor bug or it is expected by the asynchronous way Qwik is implemented

(PS: not sure why the core there is 1.5mb it does seem way way too large, it is probably because I was just running the app locally in dev mode, but even with a smaller js file, if the network is slow enough and/or the user’s interaction is fast enough the issue would appear)

Another thing to mention is that this only happens initially when the js file gets fetched, after that no state gets lost anymore.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
manucorporatcommented, Aug 12, 2022

You guys are amazing! Yep on change behavior is a bit odd, react fakes it behaving like oninput. But we will not do this, seems a bit against the standards

2reactions
nnelgxorzcommented, Aug 12, 2022

Happy to help, @dario-piotrowicz!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What influences keyboard input speed - Wooting
While everybody is focused on mouse lag, there's little attention to keyboard lag. I'm going to explain to you why keyboard input latency ......
Read more >
Activity state changes - Android Developers
Different events, some user-triggered and some system-triggered, can cause an Activity to transition from one state to another. This document ...
Read more >
How to Fix Input Lag - Intel
Input lag makes it feel like your keyboard or gamepad commands are delayed. This makes perfect timing almost impossible. At its worst, this...
Read more >
What is Transformer Network | Towards Data Science
The Transformer Neural Network is a novel architecture that aims to solve sequence-to-sequence tasks while handling long-range dependencies with ...
Read more >
5 Common Computer Problems and Solutions | CDW
Solution · First, you can right-click and update the drivers for the device. This will require a restart but can be a quick...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found