@danielgindi/selectbox 1.0.114 → 1.0.116

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.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.114
2
+ * @danielgindi/selectbox 1.0.116
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -4337,7 +4337,8 @@
4337
4337
  evt.key === keycodeJs.VALUE_SPACE &&
4338
4338
  p.lastKeyAllowsNonTypeKeys &&
4339
4339
  !p.multi &&
4340
- !dropList.hasFocusedItem())
4340
+ !dropList.hasFocusedItem() &&
4341
+ !p.disabled)
4341
4342
  {
4342
4343
  this.toggleList();
4343
4344
  evt.preventDefault();
@@ -4349,6 +4350,8 @@
4349
4350
  if (p.input) {
4350
4351
  p.sink.
4351
4352
  add(p.input, 'input.dropdown', () => {
4353
+ if (p.disabled) return;
4354
+
4352
4355
  p.filterTerm = p.input.value.trim();
4353
4356
  p.filteredItems = null;
4354
4357
  p.itemsChanged = true;
@@ -4358,11 +4361,15 @@
4358
4361
  p.throttledUpdateListItems();
4359
4362
  }).
4360
4363
  add(p.input, 'click.dropdown', () => {
4364
+ if (p.disabled) return;
4365
+
4361
4366
  if (!p.multi && p.searchable) {
4362
4367
  this.openList();
4363
4368
  }
4364
4369
  }).
4365
4370
  add(p.input, 'focus.dropdown', () => {
4371
+ if (p.disabled) return;
4372
+
4366
4373
  this._trigger('search:focus');
4367
4374
 
4368
4375
  if (this[DestroyedSymbol]) return; // destroyed by event handler
@@ -4374,6 +4381,8 @@
4374
4381
  setTimeout(() => {avoidToggleFromClick = false;}, 10);
4375
4382
  }).
4376
4383
  add(p.input, 'blur.dropdown', () => {
4384
+ if (p.disabled) return;
4385
+
4377
4386
  this._trigger('search:blur');
4378
4387
 
4379
4388
  if (this[DestroyedSymbol]) return; // destroyed by event handler
@@ -4387,7 +4396,7 @@
4387
4396
 
4388
4397
  p.sink.
4389
4398
  add(p.el, 'mousedown.dropdown', () => {
4390
- if (!p.multi && !p.searchable && !avoidToggleFromClick) {
4399
+ if (!p.multi && !p.searchable && !avoidToggleFromClick && !p.disabled) {
4391
4400
  this.toggleList();
4392
4401
  }
4393
4402
  avoidToggleFromClick = false;