chosen
chosen copied to clipboard
querySelectorAll('.search-choice') returns deselected search choice
using: chosen 1.8.7, jQuery 3.3.1
Hey, I am not sure if this issue is to do with chosen or something to do with javascript itself but I want to report it anyway.
When I deselect options from the chosen select I still see the deselected option in the list of '.search-choice' list items when I run querySelectorAll('.search-choice')
on the chosen select. However when I look inside the child elements of the same select the deselected item is gone as expected.
Here is a jsfiddle with the behaviour: https://jsfiddle.net/tzdfv7mh/5/
I don't believe that this has much affect on how chosen operates but it causes issues in another library I am using which adds select ordering to chosen: https://github.com/tristanjahier/chosen-order/blob/1.x/master/dist/chosen.order.jquery.js#L107