@danielgindi/selectbox 2.0.49 → 2.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs.js +6 -2
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +8 -4
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +6 -2
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/SelectBox.js +7 -3
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 2.0.
|
|
2
|
+
* @danielgindi/selectbox 2.0.51
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -11285,6 +11285,7 @@
|
|
|
11285
11285
|
|
|
11286
11286
|
this._trigger('open:before', { list: p.dropList });
|
|
11287
11287
|
|
|
11288
|
+
if (document.activeElement !== p.input)
|
|
11288
11289
|
p.lastActiveElement = document.activeElement === document.body ? null : getFocusState(document.activeElement);
|
|
11289
11290
|
|
|
11290
11291
|
// Propagate direction to droplist
|
|
@@ -11322,6 +11323,7 @@
|
|
|
11322
11323
|
p.dropList.hide();
|
|
11323
11324
|
|
|
11324
11325
|
if (p.lastActiveElement) {
|
|
11326
|
+
if (!p.multi && !p.searchable)
|
|
11325
11327
|
restoreFocusState(p.lastActiveElement);
|
|
11326
11328
|
p.lastActiveElement = null;
|
|
11327
11329
|
}
|
|
@@ -13113,10 +13115,12 @@
|
|
|
13113
13115
|
event.preventDefault();
|
|
13114
13116
|
} else if (event.key === keycodeJs.VALUE_BACK_SPACE && target.value.length === 0) {
|
|
13115
13117
|
const itemEl = p.multiItemEls[p.multiItemEls.length - 1];
|
|
13116
|
-
if (!itemEl
|
|
13118
|
+
if (!itemEl)
|
|
13117
13119
|
return;
|
|
13118
13120
|
|
|
13119
13121
|
const item = itemEl[ItemSymbol],value = item[p.valueProp];
|
|
13122
|
+
if (value === undefined)
|
|
13123
|
+
return;
|
|
13120
13124
|
|
|
13121
13125
|
let removeselEvt = { value: value, item: item, cancel: false };
|
|
13122
13126
|
this._trigger('removesel:before', removeselEvt);
|