Skip to content

html tags in itemData prevents selection of token #54

@jonnsn

Description

@jonnsn

When using html Tags inside the property defined as itemData the item is not selectable.

var tf = new Tokenfield({
  el: document.querySelector('.my-input'),
  itemData: 'data',
  items: [{id: 1, name: 'foo', data: 'foo <b>Something important</b>'}, {id: 2, name: 'bar', data: 'bar <b>Something important</b>'}]
});

If you click on "Something important" nothing happens. Clicking on foo or bar works though as it is not wrapped in a tag I guess.

Demo: https://jsfiddle.net/ustobmgy/2/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions