HomePhabricator

Fix username typeahead in Remarkup with German keyboard layout

Tags
None
Referenced Files
None
Subscribers
None
Tokens
"Like" token, awarded by benwick.

Description

Fix username typeahead in Remarkup with German keyboard layout

Summary:
Ref T10252. The previous fix rPa8a9fddb0738 only works for macOS.
Under Windows the @ symbol is composed of AltGr+q. For Chrome and Edge the "AltGr" keypressEvent is like pressing the Control key and the Alt key at the same time.
This fix changes the condition in such a way, that this case (pressing Control and Alt at the same time) is not blocked.

Test Plan:
Testing for the issue:

  • Launch Windows 10, Select German Keyboard, Use latest Chrome (60)
  • Observe typing @ does not trigger typeahead
  • Apply patch, retest, see typeahead.

Regression tested:

  • Windows 10, Chrome, Firefox, Edge
  • Mac OS, Chrome, Firefox, Safari
  • Keyboard layouts, English, French, German, Spanish

All tests passed

Reviewers: benwick, epriestley

Reviewed By: epriestley

Subscribers: epriestley

Maniphest Tasks: T10252

Differential Revision: https://secure.phabricator.com/D18269