Skip to content
Merged
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: 5 additions & 0 deletions playwright/e2e/versions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ test.describe('Versions with distant timestamps', () => {
const current = page.locator('.ProseMirror[contenteditable="true"]')
await expect(oldVersion.getByRole('heading', { name: 'V1' })).toBeVisible()
await expect(current.getByRole('heading', { name: 'V3' })).toBeVisible()

// Test that version contents are vertically aligned
const oldBox = await oldVersion.getByRole('heading', { name: 'V1' }).boundingBox()
const currentBox = await oldVersion.getByRole('heading', { name: 'V3' }).boundingBox()
expect(Math.abs(oldBox!.y - currentBox!.y)).toBeLessThan(5)
})
})

Expand Down
7 changes: 6 additions & 1 deletion src/components/ViewerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ body .toastify.dialogs {
margin-top: calc(45px + var(--default-clickable-area));
}

.viewer[data-handler='text'] .modal-wrapper .modal-container {
.viewer--split .source-viewer .editor__content-wrapper {
// Account for missing menubar for old version in version comparison
margin-top: calc(var(--default-clickable-area) + 2 * var(--default-grid-baseline));
}

.viewer[data-handler="text"] .modal-wrapper .modal-container {
bottom: 0;
}
</style>
Loading