@ionic/core 8.8.16-nightly.20260728 → 8.8.16
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.
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* See https://playwright.dev/docs/api/class-mouse#mouse-move for more information.
|
|
10
10
|
*/
|
|
11
11
|
export const dragElementBy = async (el, page, dragByX = 0, dragByY = 0, startXCoord, startYCoord, releaseDrag = true) => {
|
|
12
|
+
var _a;
|
|
12
13
|
const boundingBox = await el.boundingBox();
|
|
13
14
|
if (!boundingBox) {
|
|
14
15
|
throw new Error('Cannot get a bounding box for an element that is not visible. See https://playwright.dev/docs/api/class-locator#locator-bounding-box for more information');
|
|
@@ -22,7 +23,16 @@ export const dragElementBy = async (el, page, dragByX = 0, dragByY = 0, startXCo
|
|
|
22
23
|
// initiates text selection on mouse.down(). In Playwright, this selection
|
|
23
24
|
// locks in before the gesture detector fires, blocking pointer events.
|
|
24
25
|
// Clearing it here allows the drag gesture to proceed normally.
|
|
25
|
-
|
|
26
|
+
//
|
|
27
|
+
// This is scoped to Firefox because the extra page.evaluate() is an awaited
|
|
28
|
+
// round-trip that adds variable latency between mouse.down() and the first
|
|
29
|
+
// mouse.move(). Chromium and WebKit don't need the selection clear, and on
|
|
30
|
+
// WebKit that latency perturbs the timing-derived gesture velocity, causing
|
|
31
|
+
// the item to settle a few pixels off and flaking screenshot comparisons
|
|
32
|
+
// (e.g. item-sliding safe-area tests).
|
|
33
|
+
if (((_a = page.context().browser()) === null || _a === void 0 ? void 0 : _a.browserType().name()) === 'firefox') {
|
|
34
|
+
await page.evaluate(() => { var _a; return (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges(); });
|
|
35
|
+
}
|
|
26
36
|
// Drag the element.
|
|
27
37
|
await moveElement(page, startX, startY, dragByX, dragByY);
|
|
28
38
|
if (releaseDrag) {
|
package/dist/docs.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/core",
|
|
3
|
-
"version": "8.8.16
|
|
3
|
+
"version": "8.8.16",
|
|
4
4
|
"description": "Base components for Ionic",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">= 16"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@capacitor/status-bar": "^8.0.0",
|
|
47
47
|
"@ionic/eslint-config": "^0.3.0",
|
|
48
48
|
"@ionic/prettier-config": "^2.0.0",
|
|
49
|
-
"@playwright/test": "^1.
|
|
49
|
+
"@playwright/test": "^1.62.0",
|
|
50
50
|
"@rollup/plugin-node-resolve": "^8.4.0",
|
|
51
51
|
"@rollup/plugin-virtual": "^2.0.3",
|
|
52
52
|
"@stencil/angular-output-target": "^0.10.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fs-extra": "^9.0.1",
|
|
68
68
|
"jest": "^29.7.0",
|
|
69
69
|
"jest-cli": "^29.7.0",
|
|
70
|
-
"playwright-core": "^1.
|
|
70
|
+
"playwright-core": "^1.62.0",
|
|
71
71
|
"prettier": "^2.6.1",
|
|
72
72
|
"rollup": "^2.26.4",
|
|
73
73
|
"sass": "^1.33.0",
|