vanillaSelectBox
vanillaSelectBox copied to clipboard
Clicking again on the opened dropdown without selecting any option doesn't closes it.
Click on any vanilla selectbox it will open the dropdown, click it again without choosing anything. Ideally it should close the dropdown but doesn't closes it. It only closes when user clicks outside.
Exactly, I have the same issue right now
@msankhala I've fixed it. You can create patch or include file in repo and modify it. In line https://github.com/PhilippeMarcMeyer/vanillaSelectBox/blob/4e8a2e0c664a112bd32c88d068c266806825929d/vanillaSelectBox.js#L583 and 584 change them to
if (self.drop.style.visibility === 'visible') {
self.closeOrder();
} else {
self.drop.style.visibility = 'visible';
document.addEventListener('click', docListener);
}
I have created a Drupal module to support this library in drupal https://www.drupal.org/project/vanilla_selectbox