@atlaskit/editor-plugin-table 5.4.18 → 5.4.19
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,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.4.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59403](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59403) [`4edf50cbdc01`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4edf50cbdc01) - Fixed DnD preview bug which was impacting safari when the preview snapshot was taken, other html elements below the preview zone would be included.
|
|
8
|
+
|
|
3
9
|
## 5.4.18
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -88,6 +88,15 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
88
88
|
getOffset: function getOffset(_ref3) {
|
|
89
89
|
var container = _ref3.container;
|
|
90
90
|
var rect = container.getBoundingClientRect();
|
|
91
|
+
if (_utils.browser.safari) {
|
|
92
|
+
// See: https://product-fabric.atlassian.net/browse/ED-21442
|
|
93
|
+
// We need to ensure that the preview is not overlaying screen content when the snapshot is taken, otherwise
|
|
94
|
+
// safari will composite the screen text elements into the bitmap snapshot. The container is a wrapper which is already
|
|
95
|
+
// positioned fixed at top/left 0.
|
|
96
|
+
// IMPORTANT: we must not exceed more then the width of the container off-screen otherwise not preview will
|
|
97
|
+
// be generated.
|
|
98
|
+
container.style.left = "-".concat(rect.width - 0.0001, "px");
|
|
99
|
+
}
|
|
91
100
|
if (direction === 'row') {
|
|
92
101
|
return {
|
|
93
102
|
x: 16,
|
|
@@ -76,6 +76,15 @@ export const DragHandle = ({
|
|
|
76
76
|
container
|
|
77
77
|
}) => {
|
|
78
78
|
const rect = container.getBoundingClientRect();
|
|
79
|
+
if (browser.safari) {
|
|
80
|
+
// See: https://product-fabric.atlassian.net/browse/ED-21442
|
|
81
|
+
// We need to ensure that the preview is not overlaying screen content when the snapshot is taken, otherwise
|
|
82
|
+
// safari will composite the screen text elements into the bitmap snapshot. The container is a wrapper which is already
|
|
83
|
+
// positioned fixed at top/left 0.
|
|
84
|
+
// IMPORTANT: we must not exceed more then the width of the container off-screen otherwise not preview will
|
|
85
|
+
// be generated.
|
|
86
|
+
container.style.left = `-${rect.width - 0.0001}px`;
|
|
87
|
+
}
|
|
79
88
|
if (direction === 'row') {
|
|
80
89
|
return {
|
|
81
90
|
x: 16,
|
|
@@ -78,6 +78,15 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
78
78
|
getOffset: function getOffset(_ref3) {
|
|
79
79
|
var container = _ref3.container;
|
|
80
80
|
var rect = container.getBoundingClientRect();
|
|
81
|
+
if (browser.safari) {
|
|
82
|
+
// See: https://product-fabric.atlassian.net/browse/ED-21442
|
|
83
|
+
// We need to ensure that the preview is not overlaying screen content when the snapshot is taken, otherwise
|
|
84
|
+
// safari will composite the screen text elements into the bitmap snapshot. The container is a wrapper which is already
|
|
85
|
+
// positioned fixed at top/left 0.
|
|
86
|
+
// IMPORTANT: we must not exceed more then the width of the container off-screen otherwise not preview will
|
|
87
|
+
// be generated.
|
|
88
|
+
container.style.left = "-".concat(rect.width - 0.0001, "px");
|
|
89
|
+
}
|
|
81
90
|
if (direction === 'row') {
|
|
82
91
|
return {
|
|
83
92
|
x: 16,
|
package/package.json
CHANGED
|
@@ -112,6 +112,15 @@ export const DragHandle = ({
|
|
|
112
112
|
setCustomNativeDragPreview({
|
|
113
113
|
getOffset: ({ container }) => {
|
|
114
114
|
const rect = container.getBoundingClientRect();
|
|
115
|
+
if (browser.safari) {
|
|
116
|
+
// See: https://product-fabric.atlassian.net/browse/ED-21442
|
|
117
|
+
// We need to ensure that the preview is not overlaying screen content when the snapshot is taken, otherwise
|
|
118
|
+
// safari will composite the screen text elements into the bitmap snapshot. The container is a wrapper which is already
|
|
119
|
+
// positioned fixed at top/left 0.
|
|
120
|
+
// IMPORTANT: we must not exceed more then the width of the container off-screen otherwise not preview will
|
|
121
|
+
// be generated.
|
|
122
|
+
container.style.left = `-${rect.width - 0.0001}px`;
|
|
123
|
+
}
|
|
115
124
|
if (direction === 'row') {
|
|
116
125
|
return { x: 16, y: 16 };
|
|
117
126
|
} else {
|