You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Hotfix for tab press bug
The bug was that *sometimes* typing in some letters then pressing tab would flash red and not auto-complete. This was happening because nextMatchedEntry was being called with 0 because the state of inPassiveMode was wrong.
This commit is contained in:
@@ -170,6 +170,13 @@ class TabComplete {
|
|||||||
this.stopTabCompleting();
|
this.stopTabCompleting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// explicitly pressing any key except tab removes passive mode. Tab doesn't remove
|
||||||
|
// passive mode because handleTabPress needs to know when passive mode is toggling
|
||||||
|
// off so it can resync the textarea/peek list. If tab did remove passive mode then
|
||||||
|
// handleTabPress would never be able to tell when passive mode toggled off.
|
||||||
|
this.inPassiveMode = false;
|
||||||
|
|
||||||
// pressing any key at all (except tab) restarts the automatic tab-complete timer
|
// pressing any key at all (except tab) restarts the automatic tab-complete timer
|
||||||
if (this.opts.autoEnterTabComplete) {
|
if (this.opts.autoEnterTabComplete) {
|
||||||
clearTimeout(this.enterTabCompleteTimerId);
|
clearTimeout(this.enterTabCompleteTimerId);
|
||||||
|
|||||||
Reference in New Issue
Block a user