@danielgindi/selectbox 1.0.80 → 1.0.81
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 +9 -11
- 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 +9 -11
- 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 +9 -11
- 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 +8 -10
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.81
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -11398,6 +11398,9 @@
|
|
|
11398
11398
|
return;
|
|
11399
11399
|
|
|
11400
11400
|
var suppressEnterSpaceToggle = false;
|
|
11401
|
+
var lastKeyAllowsNonTypeKeys = p.lastKeyAllowsNonTypeKeys;
|
|
11402
|
+
p.lastKeyAllowsNonTypeKeys = false;
|
|
11403
|
+
var hasInputText = p.input && p.input.value.length > 0;
|
|
11401
11404
|
|
|
11402
11405
|
switch (evt.key) {
|
|
11403
11406
|
case keycodeJs.VALUE_PAGE_UP:
|
|
@@ -11407,12 +11410,13 @@
|
|
|
11407
11410
|
case keycodeJs.VALUE_HOME:
|
|
11408
11411
|
case keycodeJs.VALUE_END:
|
|
11409
11412
|
if ((evt.key === keycodeJs.VALUE_HOME || evt.key === keycodeJs.VALUE_END) &&
|
|
11410
|
-
|
|
11413
|
+
hasInputText && !lastKeyAllowsNonTypeKeys) {
|
|
11411
11414
|
// Allow using HOME/END button within the textbox
|
|
11412
11415
|
dropList._keydownFreeType(evt);
|
|
11413
11416
|
break;
|
|
11414
11417
|
}
|
|
11415
11418
|
|
|
11419
|
+
p.lastKeyAllowsNonTypeKeys = true;
|
|
11416
11420
|
evt.preventDefault();
|
|
11417
11421
|
|
|
11418
11422
|
switch (evt.key) {
|
|
@@ -11450,7 +11454,9 @@
|
|
|
11450
11454
|
break;
|
|
11451
11455
|
|
|
11452
11456
|
case keycodeJs.VALUE_SPACE:
|
|
11453
|
-
if (
|
|
11457
|
+
if (lastKeyAllowsNonTypeKeys) {
|
|
11458
|
+
p.lastKeyAllowsNonTypeKeys = true;
|
|
11459
|
+
|
|
11454
11460
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
11455
11461
|
suppressEnterSpaceToggle = true;
|
|
11456
11462
|
if (p.multi)
|
|
@@ -11488,14 +11494,6 @@
|
|
|
11488
11494
|
break;}
|
|
11489
11495
|
|
|
11490
11496
|
|
|
11491
|
-
p.lastKeyAllowsNonTypeKeys = evt.key === keycodeJs.VALUE_UP ||
|
|
11492
|
-
evt.key === keycodeJs.VALUE_DOWN ||
|
|
11493
|
-
evt.key === keycodeJs.VALUE_PAGE_UP ||
|
|
11494
|
-
evt.key === keycodeJs.VALUE_PAGE_DOWN ||
|
|
11495
|
-
evt.key === keycodeJs.VALUE_HOME ||
|
|
11496
|
-
evt.key === keycodeJs.VALUE_END ||
|
|
11497
|
-
evt.key === keycodeJs.VALUE_SPACE && !!p.lastKeyAllowsNonTypeKeys;
|
|
11498
|
-
|
|
11499
11497
|
if (!suppressEnterSpaceToggle) {
|
|
11500
11498
|
if (evt.key === keycodeJs.VALUE_ENTER ||
|
|
11501
11499
|
evt.key === keycodeJs.VALUE_SPACE &&
|