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 +4 -4
- data/assets/javascripts/popper.js +29 -23
- data/lib/popper_js/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577f1f4a06dcf219922bf764954720b5f2f35038
|
4
|
+
data.tar.gz: b1ecdbf0e183e7a4aa262078725fa73c23d754c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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', '
|
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++) {
|
data/lib/popper_js/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|