-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/checkbox): page jumps on checkbox click in scrollable ix-con…
…tent (#1527)
- Loading branch information
1 parent
ecf02d5
commit ed67657
Showing
11 changed files
with
124 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@siemens/ix': patch | ||
--- | ||
|
||
fix(core/checkbox): page jumps on checkbox click in scrollable ix-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2024 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<ix-content style="height: 200px"> | ||
<ix-content-header slot="header" header-title="My Content Page"> | ||
</ix-content-header> | ||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy | ||
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam | ||
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet | ||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | ||
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam | ||
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed | ||
diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. | ||
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor | ||
sit amet. | ||
</ix-content> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { expect } from '@playwright/test'; | ||
import { regressionTest } from '@utils/test'; | ||
|
||
regressionTest.describe('content', () => { | ||
regressionTest('basic', async ({ page }) => { | ||
await page.goto('content/basic'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
regressionTest('scroll and check', async ({ page }) => { | ||
await page.goto('content/scrollable'); | ||
|
||
const label = page.locator('label[for="checkbox_07"]'); | ||
await label.scrollIntoViewIfNeeded(); | ||
await label.click(); | ||
|
||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
}); |
Binary file added
BIN
+39.4 KB
...ontent.e2e.ts-snapshots/content-basic-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
...ntent.e2e.ts-snapshots/content-basic-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.4 KB
...ts-snapshots/content-scroll-and-check-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11 KB
...s-snapshots/content-scroll-and-check-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2024 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body> | ||
<ix-content style="height: 200px"> | ||
<div class="d-flex flex-column" style="background: red; overflow-y: auto"> | ||
<h2>Bug repro</h2> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_01" /> | ||
<label for="checkbox_01">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_02" /> | ||
<label for="checkbox_02">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_03" /> | ||
<label for="checkbox_03">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_04" /> | ||
<label for="checkbox_04">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_05" /> | ||
<label for="checkbox_05">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_06" /> | ||
<label for="checkbox_06">Scroll down</label> | ||
</div> | ||
<div style="margin-bottom: 1rem"> | ||
<input type="checkbox" id="checkbox_07" /> | ||
<label for="checkbox_07">Check me!</label> | ||
</div> | ||
</div> | ||
</ix-content> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |