Skip to content

Commit

Permalink
[bugfix] when editing a tag, pressing backspace key should not remove…
Browse files Browse the repository at this point in the history
… any tags
  • Loading branch information
yairEO committed Apr 24, 2024
1 parent 1a9d1ab commit b059350
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/parts/events.js
Expand Up @@ -284,15 +284,14 @@ export default {
switch( e.key ){
// remove tag if has focus
case 'Backspace': {
if( !_s.readonly ) {
if( !_s.readonly && !this.state.editing ) {
this.removeTags(focusedElm);
(nextTag ? nextTag : this.DOM.input).focus()
}

break;
}

// edit tag if has focus
case 'Enter': {
if( targetIsRemoveBtn ) {
this.removeTags( e.target.parentNode )
Expand Down

0 comments on commit b059350

Please sign in to comment.