diff --git a/e2e/runConfigDialogScroll.spec.ts b/e2e/runConfigDialogScroll.spec.ts
index 7b15417b4..20aabe883 100644
--- a/e2e/runConfigDialogScroll.spec.ts
+++ b/e2e/runConfigDialogScroll.spec.ts
@@ -2,7 +2,7 @@ import type { Locator, Page } from "@playwright/test";
import { expect, test } from "./fixtures";
for (const height of [990, 700, 560]) {
- test(`run configurations dialog keeps its toolbar and scrolls only inside the panes at ${height}px`, async ({
+ test(`run configurations dialog keeps its toolbar and name visible while scrolling at ${height}px`, async ({
workbench: page,
}) => {
await page.setViewportSize({ width: 900, height });
@@ -62,9 +62,13 @@ async function resize(page: Page, dialog: Locator, dy: number) {
async function checkScrolling(page: Page, dialog: Locator) {
const body = dialog.locator("[data-dialog-body]");
const list = dialog.getByRole("tree", { name: "Run configurations", exact: true });
- const form = dialog.locator('[class*="_editForm_"]');
+ const form = dialog.locator('[class*="_formSettings_"]');
+ const nameField = dialog.getByRole("textbox", { name: "Name", exact: true });
await list.evaluate((el) => (el.scrollTop = 0));
await form.evaluate((el) => (el.scrollTop = 0));
+ // Measure once the dialog's opening animation has settled.
+ await dialog.evaluate((el) => Promise.all(el.getAnimations().map((animation) => animation.finished)));
+ const nameTop = (await nameField.boundingBox())!.y;
await list.hover();
await page.mouse.wheel(0, 200);
await expect.poll(() => list.evaluate((el) => el.scrollTop)).toBeGreaterThan(0);
@@ -74,6 +78,8 @@ async function checkScrolling(page: Page, dialog: Locator) {
await page.mouse.wheel(0, 200);
await expect.poll(() => form.evaluate((el) => el.scrollTop)).toBeGreaterThan(0);
expect(await list.evaluate((el) => el.scrollTop)).toBe(listTop);
+ expect((await nameField.boundingBox())!.y).toBeCloseTo(nameTop, 0);
+ await expect(dialog.getByRole("checkbox", { name: /Store as project file/ })).toBeInViewport({ ratio: 1 });
const overflow = await body.evaluate((el) => ({
scroll: el.scrollHeight,
client: el.clientHeight,
diff --git a/e2e/runConfigLayout.spec.ts b/e2e/runConfigLayout.spec.ts
index fe6af50c8..9afb50c80 100644
--- a/e2e/runConfigLayout.spec.ts
+++ b/e2e/runConfigLayout.spec.ts
@@ -112,7 +112,7 @@ test("resizing the configuration dialog grows its panes and keeps the footer vis
await expect(dialog.getByRole("tree", { name: "Run configurations", exact: true })).toBeVisible();
await expect.poll(async () => (await content.boundingBox())!.height).toBeLessThan(initial);
await expect
- .poll(() => dialog.locator("[class*='editForm_']").evaluate((el) => el.scrollHeight - el.clientHeight))
+ .poll(() => dialog.locator("[class*='_formSettings_']").evaluate((el) => el.scrollHeight - el.clientHeight))
.toBeGreaterThan(0);
});
@@ -144,7 +144,7 @@ test("Java, npm and Python forms fit narrow and zoomed content panes", async ({
for (const width of [1024, 640, 520]) {
await page.setViewportSize({ width, height: 820 });
await expect
- .poll(() => dialog.locator("[class*='editForm_']").evaluate((el) => el.scrollWidth - el.clientWidth), {
+ .poll(() => dialog.locator("[class*='_formSettings_']").evaluate((el) => el.scrollWidth - el.clientWidth), {
message: `${kind}, ${width}px, ${zoom * 100}%`,
})
.toBeLessThanOrEqual(1);
@@ -204,7 +204,7 @@ for (const locale of ["en", "zh"]) {
)
.toMatchObject({ overflow: expect.any(Number), footerFits: true, footerVisible: true });
await expect
- .poll(() => dialog.locator("[class*='editForm_']").evaluate((el) => el.scrollWidth - el.clientWidth))
+ .poll(() => dialog.locator("[class*='_formSettings_']").evaluate((el) => el.scrollWidth - el.clientWidth))
.toBeLessThanOrEqual(1);
const tasks = dialog.getByRole("list");
await tasks.scrollIntoViewIfNeeded();
diff --git a/src/features/run/ConfigForm.tsx b/src/features/run/ConfigForm.tsx
index 6c68c55ab..a9e7a20c3 100644
--- a/src/features/run/ConfigForm.tsx
+++ b/src/features/run/ConfigForm.tsx
@@ -507,7 +507,7 @@ export function ConfigForm({ config, all, type, errors, template, onChange, modi
{config.kind === "tomcat" ? (