Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/review-editor/components/ReviewSubmissionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,10 @@ export function ReviewSubmissionDialog({
View on {platformLabel} after submitting
</label>

</div>

{/* Actions */}
<div className="sticky bottom-0 -mx-4 -mb-4 flex justify-end gap-2 border-t border-border/50 bg-card px-4 pb-4 pt-3 sm:-mx-6 sm:-mb-6 sm:px-6 sm:pb-6">
<div className="shrink-0 flex justify-end gap-2 border-t border-border/50 bg-card px-4 pb-4 pt-3 sm:px-6 sm:pb-6">
<button
data-pn-touch-target
onClick={onCancel}
Expand Down Expand Up @@ -586,7 +588,6 @@ export function ReviewSubmissionDialog({
: 'Post Comments'}
</button>
</div>
</div>
</DialogContent>
</Dialog>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ describe('ReviewSubmissionDialog submission outcomes', () => {
expect(actionButton()?.hasAttribute('data-pn-touch-target')).toBe(true);
});

test.skipIf(!hasDom)('keeps the action footer outside the scrollable form body', async () => {
await renderSubmission({ targets: [baseTarget], orphans: [] });

const scrollableBody = document.querySelector('textarea')?.closest('.overflow-y-auto');

expect(scrollableBody).not.toBeNull();
expect(scrollableBody?.contains(actionButton())).toBe(false);
});

test.skipIf(!hasDom)('ignores Escape while a platform submission is in flight', async () => {
let cancelCount = 0;
await renderSubmission(
Expand Down
Loading