bootstrap-combobox icon indicating copy to clipboard operation
bootstrap-combobox copied to clipboard

Remove glyphicon not shown when using with jQuery 3.5.1

Open daniel-rutten-clickwise-limited opened this issue 4 years ago • 3 comments

I've just upgraded form jQuery 3.4.1 to 3.5.1 and the glyphicon-remove is no longer shown when I select from the drop down box. I think the problem is due to the way the template is defined (see the template function on line 181).

It looks like 3.4.1 used to translate

<span class="caret" /><span class="glyphicon glyphicon-remove" />

to

<span class="caret"></span><span class="glyphicon glyphicon-remove"></span>

but 3.5.1 turns that into

<span class="caret"><span class="glyphicon glyphicon-remove"></span></span>

Since the caret class is hidden when I select from the drop down box, the remove icon is hidden as wel.

I've fixed it for now by changing

<span class="caret" /><span class="glyphicon glyphicon-remove" />

into

<span class="caret"></span><span class="glyphicon glyphicon-remove"></span>

but I was wondering if anyone else has found this problem.

Yeah, spans are not self-closing, so that's not really valid. I'll see if I can fix that sometime today or this weekend.

tiesont avatar May 09 '20 01:05 tiesont

Related: https://jquery.com/upgrade-guide/3.5/#jquery-htmlprefilter-changes

tiesont avatar May 09 '20 01:05 tiesont

Thanks for that solution @danielrutten, works for me!

eeintech avatar May 14 '20 21:05 eeintech