Skip to content

Commit

Permalink
failed chat capitalization attempts are not variation traversal
Browse files Browse the repository at this point in the history
fix #16954
  • Loading branch information
schlawg authored Feb 13, 2025
1 parent 20d3562 commit c4cf795
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/analyse/src/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export const bind = (ctrl: AnalyseCtrl) => {
let shiftAlone = 0;
document.addEventListener('keydown', e => e.key === 'Shift' && (shiftAlone = e.location));
document.addEventListener('keyup', e => {
if (e.key === 'Shift' && e.location === shiftAlone) {
if (
e.key === 'Shift' &&
e.location === shiftAlone &&
!document.activeElement?.classList.contains('mchat__say')
) {
// hilities confound ddugovic when he fails to capitalize a letter in chat
if (shiftAlone === 1 && ctrl.fork.prev()) ctrl.setAutoShapes();
else if (shiftAlone === 2 && ctrl.fork.next()) ctrl.setAutoShapes();
else if (shiftAlone === 0) return;
Expand Down

0 comments on commit c4cf795

Please sign in to comment.