popper_js 1.10.8 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f068cf219e4b899d49d1aaa1e76421837bbbfc84
4
- data.tar.gz: 836f8bf44a3f52a55a0d294ea4156735eef0574c
3
+ metadata.gz: 577f1f4a06dcf219922bf764954720b5f2f35038
4
+ data.tar.gz: b1ecdbf0e183e7a4aa262078725fa73c23d754c0
5
5
  SHA512:
6
- metadata.gz: 65fb8ceb08822fe029c248acb4d0b8cde271baa2352863a69cb3dc444496721cc36679fd5e57c2e148d815a3a63a7a43cf484c481a32e187feb96498e7155afd
7
- data.tar.gz: 4ffcb1f6e59f117abbadec8ad70a791fbee6678df307cfaff213febe3dc74e7bab5fd6190ef45448e36e467b072a0190b673f6b66ed84cb35ba91a84f2b58669
6
+ metadata.gz: 3746ff82a4c9c49d85c57714161d2ddd8e78db833baede2c07ff8ba69566736835e9f6c2e07ec9fd2ae4ccef2ae1efb033a816cb7e12b361800e99f4378aa650
7
+ data.tar.gz: 569903603b71ebaae93af17fb8d04bd37b1af2b521ddc307214f01a18c6bbcc0e2381359f0558b55cf9c4b7f0063f45e24099483212c8dad1ded7421ae8a62d0
@@ -1,6 +1,6 @@
1
1
  /**!
2
2
  * @fileOverview Kickass library to create and place poppers near their reference elements.
3
- * @version 1.10.8
3
+ * @version 1.11.1
4
4
  * @license
5
5
  * Copyright (c) 2016 Federico Zivolo and contributors
6
6
  *
@@ -176,13 +176,38 @@ function getScrollParent(element) {
176
176
  return getScrollParent(getParentNode(element));
177
177
  }
178
178
 
179
+ /**
180
+ * Returns the offset parent of the given element
181
+ * @method
182
+ * @memberof Popper.Utils
183
+ * @argument {Element} element
184
+ * @returns {Element} offset parent
185
+ */
186
+ function getOffsetParent(element) {
187
+ // NOTE: 1 DOM access here
188
+ var offsetParent = element && element.offsetParent;
189
+ var nodeName = offsetParent && offsetParent.nodeName;
190
+
191
+ if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
192
+ return window.document.documentElement;
193
+ }
194
+
195
+ // .offsetParent will return the closest TD or TABLE in case
196
+ // no offsetParent is present, I hate this job...
197
+ if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
198
+ return getOffsetParent(offsetParent);
199
+ }
200
+
201
+ return offsetParent;
202
+ }
203
+
179
204
  function isOffsetContainer(element) {
180
205
  var nodeName = element.nodeName;
181
206
 
182
207
  if (nodeName === 'BODY') {
183
208
  return false;
184
209
  }
185
- return nodeName === 'HTML' || element.firstElementChild.offsetParent === element;
210
+ return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
186
211
  }
187
212
 
188
213
  /**
@@ -200,25 +225,6 @@ function getRoot(node) {
200
225
  return node;
201
226
  }
202
227
 
203
- /**
204
- * Returns the offset parent of the given element
205
- * @method
206
- * @memberof Popper.Utils
207
- * @argument {Element} element
208
- * @returns {Element} offset parent
209
- */
210
- function getOffsetParent(element) {
211
- // NOTE: 1 DOM access here
212
- var offsetParent = element && element.offsetParent;
213
- var nodeName = offsetParent && offsetParent.nodeName;
214
-
215
- if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
216
- return window.document.documentElement;
217
- }
218
-
219
- return offsetParent;
220
- }
221
-
222
228
  /**
223
229
  * Finds the offset parent common to the two provided nodes
224
230
  * @method
@@ -919,10 +925,10 @@ function isModifierEnabled(modifiers, modifierName) {
919
925
  * @method
920
926
  * @memberof Popper.Utils
921
927
  * @argument {String} property (camelCase)
922
- * @returns {String} prefixed property (camelCase)
928
+ * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
923
929
  */
924
930
  function getSupportedPropertyName(property) {
925
- var prefixes = [false, 'ms', 'webkit', 'moz', 'o'];
931
+ var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
926
932
  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
927
933
 
928
934
  for (var i = 0; i < prefixes.length - 1; i++) {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PopperJs
4
- VERSION = '1.10.8'
4
+ VERSION = '1.11.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popper_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.8
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler