Skip to content

Commit f0fea12

Browse files
authored
fix(web): make input focusable in the whole component's area (#794)
# Summary Fixes #793 All web e2e tests pass. Effectively, nothing should have changed visually. ## Test Plan In the example app, experiment with `height`, `minHeight` and `maxHeight` props. Write some text, so the input becomes scrollable. Verify everything looks in place. ## Screenshots / Videos When `minHeight` was set: Before: https://github.com/user-attachments/assets/211a4fa4-c4b4-47a2-b808-fce50272d865 After: https://github.com/user-attachments/assets/cc7ba1cb-9289-4cde-ab7f-2aa50a696451 ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ❌ | | Android | ❌ | | Web | ✅ | ## Checklist - [x] E2E tests are passing - [ ] Required E2E tests have been added (if applicable)
1 parent f7e9039 commit f0fea12

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.playwright/tests/images.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ test.describe('images', () => {
168168

169169
for (const key of toolbarOrder) {
170170
const editor = await focusEnrichedEditable(page);
171+
await page.waitForTimeout(10);
171172
await editor.press('Meta+A');
172173
await toolbarButton(page, key).click();
173174
await expect

src/web/EnrichedText.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
.tiptap.ProseMirror p {
1+
.eti-editor .tiptap.ProseMirror p {
22
margin-top: 0;
33
margin-bottom: 0;
44
}
55

6-
.tiptap.ProseMirror-focused {
6+
.eti-editor .tiptap.ProseMirror-focused {
77
outline: none;
88
}
99

10+
.eti-editor .tiptap {
11+
flex: 1;
12+
}
13+
14+
.eti-editor {
15+
display: flex;
16+
flex-direction: column;
17+
}
18+
1019
.et-view {
1120
white-space: pre-wrap;
1221
overflow-wrap: anywhere;

0 commit comments

Comments
 (0)