Skip to content

Commit 23c3748

Browse files
committed
Update dist files and bump version
1 parent 0c3c469 commit 23c3748

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

dist/fancyselect.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@
255255
searchString = '';
256256
searchTimeout = null;
257257
}
258+
259+
currentElement = null;
258260
}
259261

260262
/**
@@ -415,11 +417,11 @@
415417

416418
// On click on the list box button
417419
addListener(document, 'click', '.fsb-button', function (event) {
420+
var isClickToClose = currentElement === event.target;
421+
418422
closeListBox();
419423

420-
if (currentElement === event.target) {
421-
currentElement = null;
422-
} else {
424+
if (!isClickToClose) {
423425
openListBox(event.target);
424426
}
425427

@@ -464,7 +466,6 @@
464466

465467
// On click on an item
466468
addListener(document, 'click', '.fsb-option', function (event) {
467-
currentElement = null;
468469
selectItem(event.target);
469470
closeListBox(true);
470471
});

dist/fancyselect.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fancySelect",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "A drop-in replacement for native HTML select elements.",
55
"author": "Momo Bassit",
66
"license": "MIT",

0 commit comments

Comments
 (0)