From 0792d26f77185c8d429416e414d03f44f3242370 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Fri, 20 Feb 2026 02:20:02 -0800 Subject: [PATCH] fix: prevent confirm dialog buttons from being unreachable on mobile with long text (#8746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fix confirm dialog buttons becoming unreachable on mobile when text contains long unbreakable words (e.g. content-hashed filenames with 100+ characters). image ## Changes - **What**: Added `overflow-wrap: break-word` and `flex-wrap` to both confirm dialog systems so long words break properly and buttons wrap on narrow screens. - `ConfirmationDialogContent.vue`: Added `overflow-wrap: break-word` to the existing scoped style and `flex-wrap` to button row. - `ConfirmBody.vue`: Added `break-words` tailwind class. - `ConfirmFooter.vue`: Added `flex-wrap` to button section. ## Review Focus Minimal CSS-only fix across both dialog systems (legacy `dialogService.confirm()` and newer `showConfirmDialog()`). No behavioral changes. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8746-fix-prevent-confirm-dialog-buttons-from-being-unreachable-on-mobile-with-long-text-3016d73d36508116bf55f0dc5cd89d0b) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action --- .../tests/confirmDialogTextWrap.spec.ts | 32 +++++++++++++ src/components/dialog/GlobalDialog.vue | 4 ++ src/components/dialog/confirm/ConfirmBody.vue | 2 +- .../dialog/confirm/ConfirmFooter.vue | 2 +- .../content/ConfirmationDialogContent.test.ts | 45 +++++++++++++++++++ .../content/ConfirmationDialogContent.vue | 43 +++++++++--------- 6 files changed, 103 insertions(+), 25 deletions(-) create mode 100644 browser_tests/tests/confirmDialogTextWrap.spec.ts create mode 100644 src/components/dialog/content/ConfirmationDialogContent.test.ts diff --git a/browser_tests/tests/confirmDialogTextWrap.spec.ts b/browser_tests/tests/confirmDialogTextWrap.spec.ts new file mode 100644 index 0000000000..6a12ccd1b6 --- /dev/null +++ b/browser_tests/tests/confirmDialogTextWrap.spec.ts @@ -0,0 +1,32 @@ +import { expect } from '@playwright/test' + +import { comfyPageFixture as test } from '../fixtures/ComfyPage' + +test.describe('Confirm dialog text wrapping', { tag: ['@mobile'] }, () => { + test('@mobile confirm dialog buttons are visible with long unbreakable text', async ({ + comfyPage + }) => { + const longFilename = 'workflow_checkpoint_' + 'a'.repeat(200) + '.json' + + await comfyPage.page.evaluate((msg) => { + window + .app!.extensionManager.dialog.confirm({ + title: 'Confirm', + type: 'default', + message: msg + }) + .catch(() => {}) + }, longFilename) + + const dialog = comfyPage.page.getByRole('dialog') + await expect(dialog).toBeVisible() + + const confirmButton = dialog.getByRole('button', { name: 'Confirm' }) + await expect(confirmButton).toBeVisible() + await expect(confirmButton).toBeInViewport() + + const cancelButton = dialog.getByRole('button', { name: 'Cancel' }) + await expect(cancelButton).toBeVisible() + await expect(cancelButton).toBeInViewport() + }) +}) diff --git a/src/components/dialog/GlobalDialog.vue b/src/components/dialog/GlobalDialog.vue index 900d843d2f..a903ac9347 100644 --- a/src/components/dialog/GlobalDialog.vue +++ b/src/components/dialog/GlobalDialog.vue @@ -73,6 +73,10 @@ function getDialogPt(item: {