Skip to content

Commit

Permalink
fix: track Tab press for contenteditable
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Jul 11, 2020
1 parent e8405f3 commit b38e452
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/build-workflow/buildPressSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ const debug = Debug('qawolf:buildPressSteps');

const KEYS_TO_TRACK_FOR_CONTENTEDITABLE = new Set([
// Enter types a line break, shouldn't be a press.
// Tab types a tab character, shouldn't be a press.
'Escape'
'Escape',
// NOTE: Sometimes tab types a tab character, but this seems to be
// only with libraries like Quill that must intercept the keydown.
// It seems difficult to detect when this is happening, so for now
// an extra Tab press may be built and would need to be manually
// deleted from the generated test.
'Tab'
]);

const KEYS_TO_TRACK_FOR_INPUT = new Set([
Expand Down

0 comments on commit b38e452

Please sign in to comment.