Skip to content

Commit

Permalink
fixes #1351 - if a tag should be created when the setting `autoComple…
Browse files Browse the repository at this point in the history
…te.rightKey` is set to `true` then do not procceed with `keydown` logic within the suggestions dropdown
  • Loading branch information
yairEO committed Jun 12, 2024
1 parent 0d621ee commit 09b5f7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parts/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export default {
break;

case 'ArrowRight' :
if( this.state.actions.ArrowLeft )
// do not continue if the left arrow key was pressed while typing, because assuming the user wants to bypass any of the below logic and edit the content without intervention.
// also do not procceed if a tag should be created when the setting `autoComplete.rightKey` is set to `true`
if( this.state.actions.ArrowLeft || _s.autoComplete.rightKey )
return
case 'Tab' : {
let shouldAutocompleteOnKey = !_s.autoComplete.rightKey || !_s.autoComplete.tabKey
Expand Down

0 comments on commit 09b5f7c

Please sign in to comment.