-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fixes search input dropping key input #2942
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
Conversation
* The issue seemed to stem from the debounced state updates. Two keystrokes close together would cause the first one to be dropped. Say Keystroke A and Keystroke B happen in the same debounce interval. Only Keystroke B would be 'saved' to the state.
|
The key dropping with fast typing seems already fixed on master. Can you please double check? I think there is another issue on master. If you're backspace deleting the text it happens sometimes that the search field is losing focus and the markdown editor text area will be focused instead. |
|
Has this change been incorporated into the latest release (0.11.16) ? It appears not. Can somebody make it happen? This problem basically makes the search function useless for me. The problem as I experience it is:
If nothing else, can the developers maybe consider adding an option to NOT auto-focus the first search result? At least then I could fix the dropped keys without having to switch to the mouse and reselect the search field. |
|
@fmomin thanks for the guidance. confirming this fixes the problem for me |
|
@Rokt33r @AWolf81 Fwiw, there are still reports of this issue: #2843 (comment) |
|
AFAIK, #3037 fixed this problem. Let me know if it is still broken in master branch. And the fix will be shipped in 2~3 days. |
|
@Rokt33r Fair enough. I just wanted to leave a piece of feedback. I offered up this PR 2 months before the fix in #3037. Personally, I can't help but to admit I find that frustrating. It feels like a lot of wasted time/effort. This really disinclines me from wanting to make future contributions. I would imagine that this would frustrate future would-be contributors, too. |
Understood. The problem is I don't have enough time to review prs.. lots of people are using the app though. The good news is I've just started actively preparing the new Boostnote app from this month. But it would take 2~3 months to reveal the new thing from now. I hope you could find us providing better app around end of this October.... I'll do my best. Sorry for disappointing you. |

Description
This PR fixes #2843.
The source of the issue seems to have been the asynchronous setting of the component's state. Prior to this change, the search input's state was being updated by a debounced
updateKeywordfunction. Pushing these updates to the event queue was causing keystrokes to be lost. The image below should make it more clear:Before this code change:

After this code change:

GIFs
Here is a gif of me trying to type
baconas fast as possibleBefore the fix.
After the fix.
Issue fixed
#2843
Type of changes
Checklist: