@danielgindi/selectbox 2.0.49 → 2.0.50

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 2.0.49
2
+ * @danielgindi/selectbox 2.0.50
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -11289,6 +11289,7 @@ class SelectBox {
11289
11289
 
11290
11290
  this._trigger('open:before', { list: p.dropList });
11291
11291
 
11292
+ if (document.activeElement !== p.input)
11292
11293
  p.lastActiveElement = document.activeElement === document.body ? null : getFocusState(document.activeElement);
11293
11294
 
11294
11295
  // Propagate direction to droplist
@@ -11326,6 +11327,7 @@ class SelectBox {
11326
11327
  p.dropList.hide();
11327
11328
 
11328
11329
  if (p.lastActiveElement) {
11330
+ if (!p.multi && !p.searchable)
11329
11331
  restoreFocusState(p.lastActiveElement);
11330
11332
  p.lastActiveElement = null;
11331
11333
  }