Skip to content

Commit

Permalink
[bugfix] only in select-mode, when clicking anywhere in the selecte…
Browse files Browse the repository at this point in the history
…d tag's text, the caret should remain at the clicked location
  • Loading branch information
yairEO committed May 4, 2024
1 parent aff9c42 commit 630ad2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tagify.js
Expand Up @@ -555,7 +555,7 @@ Tagify.prototype = {
this.trigger("edit:start", { tag:tagElm, index:tagIdx, data:tagData, isValid })

editableElm.focus()
this.setRangeAtStartEnd(false, editableElm) // place the caret at the END of the editable tag text
!isSelectMode && this.setRangeAtStartEnd(false, editableElm) // place the caret at the END of the editable tag text

_s.dropdown.enabled === 0 && !isSelectMode && this.dropdown.show()
this.state.hasFocus = true
Expand Down

0 comments on commit 630ad2f

Please sign in to comment.