@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.cjs.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
|
'use strict';
|
|
@@ -11402,6 +11402,9 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11402
11402
|
return;
|
|
11403
11403
|
|
|
11404
11404
|
var suppressEnterSpaceToggle = false;
|
|
11405
|
+
var lastKeyAllowsNonTypeKeys = p.lastKeyAllowsNonTypeKeys;
|
|
11406
|
+
p.lastKeyAllowsNonTypeKeys = false;
|
|
11407
|
+
var hasInputText = p.input && p.input.value.length > 0;
|
|
11405
11408
|
|
|
11406
11409
|
switch (evt.key) {
|
|
11407
11410
|
case keycodeJs.VALUE_PAGE_UP:
|
|
@@ -11411,12 +11414,13 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11411
11414
|
case keycodeJs.VALUE_HOME:
|
|
11412
11415
|
case keycodeJs.VALUE_END:
|
|
11413
11416
|
if ((evt.key === keycodeJs.VALUE_HOME || evt.key === keycodeJs.VALUE_END) &&
|
|
11414
|
-
|
|
11417
|
+
hasInputText && !lastKeyAllowsNonTypeKeys) {
|
|
11415
11418
|
// Allow using HOME/END button within the textbox
|
|
11416
11419
|
dropList._keydownFreeType(evt);
|
|
11417
11420
|
break;
|
|
11418
11421
|
}
|
|
11419
11422
|
|
|
11423
|
+
p.lastKeyAllowsNonTypeKeys = true;
|
|
11420
11424
|
evt.preventDefault();
|
|
11421
11425
|
|
|
11422
11426
|
switch (evt.key) {
|
|
@@ -11454,7 +11458,9 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11454
11458
|
break;
|
|
11455
11459
|
|
|
11456
11460
|
case keycodeJs.VALUE_SPACE:
|
|
11457
|
-
if (
|
|
11461
|
+
if (lastKeyAllowsNonTypeKeys) {
|
|
11462
|
+
p.lastKeyAllowsNonTypeKeys = true;
|
|
11463
|
+
|
|
11458
11464
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
11459
11465
|
suppressEnterSpaceToggle = true;
|
|
11460
11466
|
if (p.multi)
|
|
@@ -11492,14 +11498,6 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11492
11498
|
break;}
|
|
11493
11499
|
|
|
11494
11500
|
|
|
11495
|
-
p.lastKeyAllowsNonTypeKeys = evt.key === keycodeJs.VALUE_UP ||
|
|
11496
|
-
evt.key === keycodeJs.VALUE_DOWN ||
|
|
11497
|
-
evt.key === keycodeJs.VALUE_PAGE_UP ||
|
|
11498
|
-
evt.key === keycodeJs.VALUE_PAGE_DOWN ||
|
|
11499
|
-
evt.key === keycodeJs.VALUE_HOME ||
|
|
11500
|
-
evt.key === keycodeJs.VALUE_END ||
|
|
11501
|
-
evt.key === keycodeJs.VALUE_SPACE && !!p.lastKeyAllowsNonTypeKeys;
|
|
11502
|
-
|
|
11503
11501
|
if (!suppressEnterSpaceToggle) {
|
|
11504
11502
|
if (evt.key === keycodeJs.VALUE_ENTER ||
|
|
11505
11503
|
evt.key === keycodeJs.VALUE_SPACE &&
|