@jetbrains/ring-ui 4.1.23 → 4.1.24
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/components/popup/popup.js +5 -1
- package/dist/popup/popup.js +7 -1
- package/package.json +2 -2
|
@@ -59,6 +59,7 @@ export default class Popup extends PureComponent {
|
|
|
59
59
|
|
|
60
60
|
directions: PropTypes.arrayOf(PropTypes.string),
|
|
61
61
|
autoPositioning: PropTypes.bool,
|
|
62
|
+
autoPositioningOnScroll: PropTypes.bool,
|
|
62
63
|
autoCorrectTopOverflow: PropTypes.bool,
|
|
63
64
|
left: PropTypes.number,
|
|
64
65
|
top: PropTypes.number,
|
|
@@ -91,6 +92,7 @@ export default class Popup extends PureComponent {
|
|
|
91
92
|
|
|
92
93
|
directions: DEFAULT_DIRECTIONS,
|
|
93
94
|
autoPositioning: true,
|
|
95
|
+
autoPositioningOnScroll: true,
|
|
94
96
|
autoCorrectTopOverflow: true,
|
|
95
97
|
left: 0,
|
|
96
98
|
top: 0,
|
|
@@ -250,7 +252,9 @@ export default class Popup extends PureComponent {
|
|
|
250
252
|
setTimeout(() => {
|
|
251
253
|
this._listenersEnabled = true;
|
|
252
254
|
this.listeners.add(window, 'resize', this._redraw);
|
|
253
|
-
this.
|
|
255
|
+
if (this.props.autoPositioningOnScroll) {
|
|
256
|
+
this.listeners.add(window, 'scroll', this._redraw);
|
|
257
|
+
}
|
|
254
258
|
this.listeners.add(document, 'pointerdown', this._onDocumentClick, true);
|
|
255
259
|
let el = this._getAnchor();
|
|
256
260
|
while (el) {
|
package/dist/popup/popup.js
CHANGED
|
@@ -213,7 +213,11 @@ class Popup extends PureComponent {
|
|
|
213
213
|
setTimeout(() => {
|
|
214
214
|
this._listenersEnabled = true;
|
|
215
215
|
this.listeners.add(window, 'resize', this._redraw);
|
|
216
|
-
|
|
216
|
+
|
|
217
|
+
if (this.props.autoPositioningOnScroll) {
|
|
218
|
+
this.listeners.add(window, 'scroll', this._redraw);
|
|
219
|
+
}
|
|
220
|
+
|
|
217
221
|
this.listeners.add(document, 'pointerdown', this._onDocumentClick, true);
|
|
218
222
|
|
|
219
223
|
let el = this._getAnchor();
|
|
@@ -336,6 +340,7 @@ _defineProperty(Popup, "propTypes", {
|
|
|
336
340
|
// true means that it's never used in SSR
|
|
337
341
|
directions: PropTypes.arrayOf(PropTypes.string),
|
|
338
342
|
autoPositioning: PropTypes.bool,
|
|
343
|
+
autoPositioningOnScroll: PropTypes.bool,
|
|
339
344
|
autoCorrectTopOverflow: PropTypes.bool,
|
|
340
345
|
left: PropTypes.number,
|
|
341
346
|
top: PropTypes.number,
|
|
@@ -370,6 +375,7 @@ _defineProperty(Popup, "defaultProps", {
|
|
|
370
375
|
keepMounted: false,
|
|
371
376
|
directions: DEFAULT_DIRECTIONS,
|
|
372
377
|
autoPositioning: true,
|
|
378
|
+
autoPositioningOnScroll: true,
|
|
373
379
|
autoCorrectTopOverflow: true,
|
|
374
380
|
left: 0,
|
|
375
381
|
top: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.24",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "cf49a348b5bcdf3b6515e549759f657b87654d3a"
|
|
225
225
|
}
|