Skip to content

Commit

Permalink
fixes #1046 - clicking an uneditable tag when the editTags settings…
Browse files Browse the repository at this point in the history
… is set to `clicks: 1` gives focus to the Tagify field which cannot be unfocused by clicking outside
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Jun 22, 2022
1 parent bdc22bd commit cfd3e0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ export default {

onDoubleClickScope(e){
var tagElm = e.target.closest('.' + this.settings.classNames.tag),
tagData = this.tagData(tagElm),
_s = this.settings,
isEditingTag,
isReadyOnlyTag;

if( !tagElm || !_s.userInput ) return
if( !tagElm || !_s.userInput || tagData.editable === false ) return

isEditingTag = tagElm.classList.contains(this.settings.classNames.tagEditing)
isReadyOnlyTag = tagElm.hasAttribute('readonly')
Expand Down

0 comments on commit cfd3e0c

Please sign in to comment.