@danielgindi/selectbox 1.0.102 → 1.0.104

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.102
2
+ * @danielgindi/selectbox 1.0.104
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -10049,8 +10049,31 @@
10049
10049
  p.sink.add(window, 'orientationchange', function () {return _this._resizeInput();});
10050
10050
 
10051
10051
  if (window.ResizeObserver !== undefined) {
10052
- p.resizeObserver = new ResizeObserver(function () {
10053
- _this._resizeInput();
10052
+ var lastSize = {
10053
+ borderBoxSize: {
10054
+ blockSize: null,
10055
+ inlineSize: null
10056
+ },
10057
+ contentBoxSize: {
10058
+ blockSize: null,
10059
+ inlineSize: null
10060
+ }
10061
+ };
10062
+ p.resizeObserver = new ResizeObserver(function (entries) {
10063
+ if (_this[DestroyedSymbol])
10064
+ return;
10065
+
10066
+ var entry = entries[0];
10067
+ if (!lastSize ||
10068
+ entry.borderBoxSize[0].blockSize !== lastSize.borderBoxSize.blockSize ||
10069
+ entry.borderBoxSize[0].inlineSize !== lastSize.borderBoxSize.inlineSize ||
10070
+ entry.contentBoxSize[0].blockSize !== lastSize.contentBoxSize.blockSize ||
10071
+ entry.contentBoxSize[0].inlineSize !== lastSize.contentBoxSize.inlineSize) {
10072
+ _this._resizeInput();
10073
+ }
10074
+
10075
+ lastSize.borderBoxSize = entry.borderBoxSize[0];
10076
+ lastSize.contentBoxSize = entry.contentBoxSize[0];
10054
10077
  });
10055
10078
  p.resizeObserver.observe(p.el);
10056
10079
  }