Skip to content

Commit

Permalink
fixes #984 - Readonly tags can be deleted by Backspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Feb 16, 2022
1 parent 9d0787d commit d675c3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/parts/events.js
Expand Up @@ -215,8 +215,11 @@ export default {
switch( e.key ){
// remove tag if has focus
case 'Backspace': {
this.removeTags(focusedElm);
(nextTag ? nextTag : this.DOM.input).focus()
if( !this.settings.readonly ) {
this.removeTags(focusedElm);
(nextTag ? nextTag : this.DOM.input).focus()
}

break;
}

Expand Down

0 comments on commit d675c3f

Please sign in to comment.