@atlaskit/editor-common 114.7.0 → 114.8.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 114.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`019540f8c0a67`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/019540f8c0a67) -
8
+ Fix editor popup scroll parent detection for chromeless editor in modals.
9
+
10
+ When the `platform_editor_fix_scrolling_popup_position` experiment is enabled, the Popup component
11
+ now prefers an explicitly provided `scrollableElement` prop over the auto-detected DOM ancestor.
12
+ This fixes popup positioning (code block language selector, table options, selection toolbar) in
13
+ chromeless editors embedded within modals, where the scroll container uses `overflow: auto` and
14
+ cannot be found by the existing `findOverflowScrollParent` utility.
15
+
16
+ The pre-computed scroll parent is also threaded through to `calculateVerticalStickTop` and
17
+ `calculateVerticalStickBottom` to avoid redundant DOM traversal and ensure position calculations
18
+ use the same element as the scroll event listener.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 114.7.0
4
25
 
5
26
  ### Minor Changes
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "114.6.2";
22
+ var packageVersion = "114.7.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "114.6.2";
27
+ var packageVersion = "114.7.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -17,6 +17,7 @@ var _rafSchd = _interopRequireDefault(require("raf-schd"));
17
17
  var _reactDom = require("react-dom");
18
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
19
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
21
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
21
22
  var _utils = require("./utils");
22
23
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -119,7 +120,8 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
119
120
  allowOutOfBounds: allowOutOfBounds,
120
121
  rect: rect,
121
122
  boundariesElement: boundariesElement || document.body,
122
- minPopupMargin: minPopupMargin
123
+ minPopupMargin: minPopupMargin,
124
+ scrollableElement: stick && (0, _expValEquals.expValEquals)('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.scrollElement : undefined
123
125
  });
124
126
  position = onPositionCalculated ? onPositionCalculated(position) : position;
125
127
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -268,12 +270,17 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
268
270
 
269
271
  // Ignored via go/ees005
270
272
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
271
- this.scrollParentElement = (0, _utils.findOverflowScrollParent)(this.props.target);
272
- if (this.scrollParentElement && this.resizeObserver) {
273
- this.resizeObserver.observe(this.scrollParentElement);
273
+ var target = this.props.target;
274
+
275
+ // Resolve the effective scroll parent: prefer the explicitly provided scrollableElement
276
+ // prop over the auto-detected ancestor. Allows product consumers to provide the correct
277
+ // scroll container (e.g. a modal body) when auto-detection can't find it.
278
+ var scrollParentElement = (0, _expValEquals.expValEquals)('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.props.scrollableElement || (0, _utils.findOverflowScrollParent)(target) : (0, _utils.findOverflowScrollParent)(target);
279
+ if (scrollParentElement && this.resizeObserver) {
280
+ this.resizeObserver.observe(scrollParentElement);
274
281
  }
275
282
  if (stick) {
276
- this.scrollElement = this.scrollParentElement;
283
+ this.scrollElement = scrollParentElement;
277
284
  } else {
278
285
  this.scrollElement = this.props.scrollableElement;
279
286
  }
@@ -145,8 +145,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
145
145
  popup = _ref2.popup,
146
146
  offset = _ref2.offset,
147
147
  position = _ref2.position,
148
- boundariesElement = _ref2.boundariesElement;
149
- var scrollParent = findOverflowScrollParent(target) || boundariesElement;
148
+ boundariesElement = _ref2.boundariesElement,
149
+ scrollableElement = _ref2.scrollableElement;
150
+ var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
150
151
  var newPos = _objectSpread({}, position);
151
152
  if (scrollParent) {
152
153
  var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
@@ -169,8 +170,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
169
170
  offset = _ref3.offset,
170
171
  position = _ref3.position,
171
172
  placement = _ref3.placement,
172
- boundariesElement = _ref3.boundariesElement;
173
- var scrollParent = findOverflowScrollParent(target) || boundariesElement;
173
+ boundariesElement = _ref3.boundariesElement,
174
+ scrollableElement = _ref3.scrollableElement;
175
+ var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
174
176
  var newPos = _objectSpread({}, position);
175
177
  if (scrollParent) {
176
178
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
@@ -233,7 +235,8 @@ function calculatePosition(_ref5) {
233
235
  allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
234
236
  rect = _ref5.rect,
235
237
  boundariesElement = _ref5.boundariesElement,
236
- minPopupMargin = _ref5.minPopupMargin;
238
+ minPopupMargin = _ref5.minPopupMargin,
239
+ scrollableElement = _ref5.scrollableElement;
237
240
  var position = {};
238
241
  if (!target || !popup || !popup.offsetParent || !isHTMLElementNode(popup.offsetParent)) {
239
242
  return position;
@@ -292,7 +295,8 @@ function calculatePosition(_ref5) {
292
295
  offset: offset,
293
296
  position: position,
294
297
  placement: verticalPlacement,
295
- boundariesElement: boundariesElement
298
+ boundariesElement: boundariesElement,
299
+ scrollableElement: scrollableElement
296
300
  });
297
301
  }
298
302
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -303,7 +307,8 @@ function calculatePosition(_ref5) {
303
307
  popup: popup,
304
308
  offset: offset,
305
309
  position: position,
306
- boundariesElement: boundariesElement
310
+ boundariesElement: boundariesElement,
311
+ scrollableElement: scrollableElement
307
312
  });
308
313
  }
309
314
  var horizontalPosition = calculateHorizontalPlacement({
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "114.6.2";
7
+ const packageVersion = "114.7.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "114.6.2";
17
+ const packageVersion = "114.7.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -5,6 +5,7 @@ import rafSchedule from 'raf-schd';
5
5
  import { createPortal, flushSync } from 'react-dom';
6
6
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
10
  import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
10
11
  // Ignored via go/ees005
@@ -96,7 +97,8 @@ export default class Popup extends React.Component {
96
97
  allowOutOfBounds,
97
98
  rect,
98
99
  boundariesElement: boundariesElement || document.body,
99
- minPopupMargin
100
+ minPopupMargin,
101
+ scrollableElement: stick && expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.scrollElement : undefined
100
102
  });
101
103
  position = onPositionCalculated ? onPositionCalculated(position) : position;
102
104
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -234,12 +236,17 @@ export default class Popup extends React.Component {
234
236
 
235
237
  // Ignored via go/ees005
236
238
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
237
- this.scrollParentElement = findOverflowScrollParent(this.props.target);
238
- if (this.scrollParentElement && this.resizeObserver) {
239
- this.resizeObserver.observe(this.scrollParentElement);
239
+ const target = this.props.target;
240
+
241
+ // Resolve the effective scroll parent: prefer the explicitly provided scrollableElement
242
+ // prop over the auto-detected ancestor. Allows product consumers to provide the correct
243
+ // scroll container (e.g. a modal body) when auto-detection can't find it.
244
+ const scrollParentElement = expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.props.scrollableElement || findOverflowScrollParent(target) : findOverflowScrollParent(target);
245
+ if (scrollParentElement && this.resizeObserver) {
246
+ this.resizeObserver.observe(scrollParentElement);
240
247
  }
241
248
  if (stick) {
242
- this.scrollElement = this.scrollParentElement;
249
+ this.scrollElement = scrollParentElement;
243
250
  } else {
244
251
  this.scrollElement = this.props.scrollableElement;
245
252
  }
@@ -131,9 +131,10 @@ const calculateVerticalStickBottom = ({
131
131
  popup,
132
132
  offset,
133
133
  position,
134
- boundariesElement
134
+ boundariesElement,
135
+ scrollableElement
135
136
  }) => {
136
- const scrollParent = findOverflowScrollParent(target) || boundariesElement;
137
+ const scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
137
138
  const newPos = {
138
139
  ...position
139
140
  };
@@ -158,9 +159,10 @@ const calculateVerticalStickTop = ({
158
159
  offset,
159
160
  position,
160
161
  placement,
161
- boundariesElement
162
+ boundariesElement,
163
+ scrollableElement
162
164
  }) => {
163
- const scrollParent = findOverflowScrollParent(target) || boundariesElement;
165
+ const scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
164
166
  const newPos = {
165
167
  ...position
166
168
  };
@@ -226,7 +228,8 @@ export function calculatePosition({
226
228
  allowOutOfBounds = false,
227
229
  rect,
228
230
  boundariesElement,
229
- minPopupMargin
231
+ minPopupMargin,
232
+ scrollableElement
230
233
  }) {
231
234
  let position = {};
232
235
  if (!target || !popup || !popup.offsetParent || !isHTMLElementNode(popup.offsetParent)) {
@@ -289,7 +292,8 @@ export function calculatePosition({
289
292
  offset,
290
293
  position,
291
294
  placement: verticalPlacement,
292
- boundariesElement
295
+ boundariesElement,
296
+ scrollableElement
293
297
  });
294
298
  }
295
299
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -300,7 +304,8 @@ export function calculatePosition({
300
304
  popup,
301
305
  offset,
302
306
  position,
303
- boundariesElement
307
+ boundariesElement,
308
+ scrollableElement
304
309
  });
305
310
  }
306
311
  const horizontalPosition = calculateHorizontalPlacement({
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "114.6.2";
13
+ var packageVersion = "114.7.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "114.6.2";
24
+ var packageVersion = "114.7.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -14,6 +14,7 @@ import rafSchedule from 'raf-schd';
14
14
  import { createPortal, flushSync } from 'react-dom';
15
15
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
18
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
19
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
19
20
  // Ignored via go/ees005
@@ -112,7 +113,8 @@ var Popup = /*#__PURE__*/function (_React$Component) {
112
113
  allowOutOfBounds: allowOutOfBounds,
113
114
  rect: rect,
114
115
  boundariesElement: boundariesElement || document.body,
115
- minPopupMargin: minPopupMargin
116
+ minPopupMargin: minPopupMargin,
117
+ scrollableElement: stick && expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.scrollElement : undefined
116
118
  });
117
119
  position = onPositionCalculated ? onPositionCalculated(position) : position;
118
120
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -261,12 +263,17 @@ var Popup = /*#__PURE__*/function (_React$Component) {
261
263
 
262
264
  // Ignored via go/ees005
263
265
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
264
- this.scrollParentElement = findOverflowScrollParent(this.props.target);
265
- if (this.scrollParentElement && this.resizeObserver) {
266
- this.resizeObserver.observe(this.scrollParentElement);
266
+ var target = this.props.target;
267
+
268
+ // Resolve the effective scroll parent: prefer the explicitly provided scrollableElement
269
+ // prop over the auto-detected ancestor. Allows product consumers to provide the correct
270
+ // scroll container (e.g. a modal body) when auto-detection can't find it.
271
+ var scrollParentElement = expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) ? this.props.scrollableElement || findOverflowScrollParent(target) : findOverflowScrollParent(target);
272
+ if (scrollParentElement && this.resizeObserver) {
273
+ this.resizeObserver.observe(scrollParentElement);
267
274
  }
268
275
  if (stick) {
269
- this.scrollElement = this.scrollParentElement;
276
+ this.scrollElement = scrollParentElement;
270
277
  } else {
271
278
  this.scrollElement = this.props.scrollableElement;
272
279
  }
@@ -131,8 +131,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
131
131
  popup = _ref2.popup,
132
132
  offset = _ref2.offset,
133
133
  position = _ref2.position,
134
- boundariesElement = _ref2.boundariesElement;
135
- var scrollParent = findOverflowScrollParent(target) || boundariesElement;
134
+ boundariesElement = _ref2.boundariesElement,
135
+ scrollableElement = _ref2.scrollableElement;
136
+ var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
136
137
  var newPos = _objectSpread({}, position);
137
138
  if (scrollParent) {
138
139
  var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
@@ -155,8 +156,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
155
156
  offset = _ref3.offset,
156
157
  position = _ref3.position,
157
158
  placement = _ref3.placement,
158
- boundariesElement = _ref3.boundariesElement;
159
- var scrollParent = findOverflowScrollParent(target) || boundariesElement;
159
+ boundariesElement = _ref3.boundariesElement,
160
+ scrollableElement = _ref3.scrollableElement;
161
+ var scrollParent = scrollableElement || findOverflowScrollParent(target) || boundariesElement;
160
162
  var newPos = _objectSpread({}, position);
161
163
  if (scrollParent) {
162
164
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
@@ -219,7 +221,8 @@ export function calculatePosition(_ref5) {
219
221
  allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
220
222
  rect = _ref5.rect,
221
223
  boundariesElement = _ref5.boundariesElement,
222
- minPopupMargin = _ref5.minPopupMargin;
224
+ minPopupMargin = _ref5.minPopupMargin,
225
+ scrollableElement = _ref5.scrollableElement;
223
226
  var position = {};
224
227
  if (!target || !popup || !popup.offsetParent || !isHTMLElementNode(popup.offsetParent)) {
225
228
  return position;
@@ -278,7 +281,8 @@ export function calculatePosition(_ref5) {
278
281
  offset: offset,
279
282
  position: position,
280
283
  placement: verticalPlacement,
281
- boundariesElement: boundariesElement
284
+ boundariesElement: boundariesElement,
285
+ scrollableElement: scrollableElement
282
286
  });
283
287
  }
284
288
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -289,7 +293,8 @@ export function calculatePosition(_ref5) {
289
293
  popup: popup,
290
294
  offset: offset,
291
295
  position: position,
292
- boundariesElement: boundariesElement
296
+ boundariesElement: boundariesElement,
297
+ scrollableElement: scrollableElement
293
298
  });
294
299
  }
295
300
  var horizontalPosition = calculateHorizontalPlacement({
@@ -38,7 +38,6 @@ export interface State {
38
38
  }
39
39
  export default class Popup extends React.Component<Props, State> {
40
40
  scrollElement: undefined | false | HTMLElement;
41
- scrollParentElement: undefined | false | HTMLElement;
42
41
  rafIds: Set<number>;
43
42
  static defaultProps: {
44
43
  allowOutOfBound: boolean;
@@ -14,6 +14,7 @@ export interface CalculatePositionParams {
14
14
  rect?: DOMRect;
15
15
  stick?: boolean;
16
16
  target?: HTMLElement;
17
+ scrollableElement?: HTMLElement | false;
17
18
  }
18
19
  export declare function isBody(elem: HTMLElement | Element): boolean;
19
20
  export declare function isTextNode(elem: HTMLElement | Element): boolean;
@@ -30,7 +31,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
30
31
  * Calculates relative coordinates for placing popup along with the target.
31
32
  * Uses placement from calculatePlacement.
32
33
  */
33
- export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, minPopupMargin, }: CalculatePositionParams): Position;
34
+ export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, minPopupMargin, scrollableElement, }: CalculatePositionParams): Position;
34
35
  export declare function validatePosition(popup: HTMLElement): boolean;
35
36
  /**
36
37
  * Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
@@ -41,7 +41,6 @@ export interface State {
41
41
  }
42
42
  export default class Popup extends React.Component<Props, State> {
43
43
  scrollElement: undefined | false | HTMLElement;
44
- scrollParentElement: undefined | false | HTMLElement;
45
44
  rafIds: Set<number>;
46
45
  static defaultProps: {
47
46
  allowOutOfBound: boolean;
@@ -17,6 +17,7 @@ export interface CalculatePositionParams {
17
17
  rect?: DOMRect;
18
18
  stick?: boolean;
19
19
  target?: HTMLElement;
20
+ scrollableElement?: HTMLElement | false;
20
21
  }
21
22
  export declare function isBody(elem: HTMLElement | Element): boolean;
22
23
  export declare function isTextNode(elem: HTMLElement | Element): boolean;
@@ -36,7 +37,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
36
37
  * Calculates relative coordinates for placing popup along with the target.
37
38
  * Uses placement from calculatePlacement.
38
39
  */
39
- export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, minPopupMargin, }: CalculatePositionParams): Position;
40
+ export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, minPopupMargin, scrollableElement, }: CalculatePositionParams): Position;
40
41
  export declare function validatePosition(popup: HTMLElement): boolean;
41
42
  /**
42
43
  * Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "114.7.0",
3
+ "version": "114.8.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/editor-tables": "^2.9.0",
58
58
  "@atlaskit/editor-toolbar": "^1.0.0",
59
59
  "@atlaskit/editor-toolbar-model": "^0.4.0",
60
- "@atlaskit/emoji": "^70.1.0",
60
+ "@atlaskit/emoji": "^70.2.0",
61
61
  "@atlaskit/icon": "^34.3.0",
62
62
  "@atlaskit/icon-object": "^7.5.0",
63
63
  "@atlaskit/link": "^3.4.0",
@@ -86,9 +86,9 @@
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.0.0",
88
88
  "@atlaskit/textfield": "^8.3.0",
89
- "@atlaskit/tmp-editor-statsig": "^66.0.0",
89
+ "@atlaskit/tmp-editor-statsig": "^66.1.0",
90
90
  "@atlaskit/tokens": "^13.0.0",
91
- "@atlaskit/tooltip": "^21.1.0",
91
+ "@atlaskit/tooltip": "^21.2.0",
92
92
  "@atlaskit/width-detector": "^5.1.0",
93
93
  "@babel/runtime": "^7.0.0",
94
94
  "@compiled/react": "^0.20.0",