typeahead: Fix bug where typeahead showed momentarily on shift + tab.

Since the keyup event for keys including shift triggers the typeahead,
shift tabbing into the topic recipient field would show the typeahead
momentarily, which is distracting.

As we need typeahead to trigger on shift for certain use cases in the
compose box, but not in the topic recipient field, we now do not trigger
typeahead on shift keyup events in the topic recipient field.

Fixes: #24152.
This commit is contained in:
N-Shar-ma
2023-11-29 04:07:14 +05:30
committed by Tim Abbott
parent 3a6c98f6a9
commit 0003c3c1ef

View File

@@ -526,6 +526,13 @@ import {get_string_diff} from "../../src/util";
}
break
// to stop typeahead from showing up momentarily
// when shift + tabbing to the topic field
case 16: // shift
if (e.currentTarget.id === "stream_message_recipient_topic") {
return;
}
default:
var hideOnEmpty = false
// backspace