Skip to content

Commit

Permalink
Fix ChatRoom message input height and autoresize
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Jan 17, 2023
1 parent 9af304d commit dc45aa0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data-browser/src/views/ChatRoomPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import Markdown from '../components/datatypes/Markdown';
import { Detail } from '../components/Detail';
import { EditableTitle } from '../components/EditableTitle';
import { Guard } from '../components/Guard';
import { NavBarSpacer } from '../components/NavBarSpacer';
import { editURL } from '../helpers/navigation';
import { ResourceInline } from './ResourceInline';
import { ResourcePageProps } from './ResourcePage';
Expand Down Expand Up @@ -137,7 +138,7 @@ export function ChatRoomPage({ resource }: ResourcePageProps) {
// in Firefox, scrollHeight only works if overflow is set to scroll
const height = e.target.scrollHeight;
e.target.style.overflow = overflowStyle;
const rowHeight = 25;
const rowHeight = 30;
const trows = Math.ceil(height / rowHeight) - 1;

if (trows !== textAreaHight) {
Expand Down Expand Up @@ -182,6 +183,7 @@ export function ChatRoomPage({ resource }: ResourcePageProps) {
Send
</SendButton>
</MessageForm>
<NavBarSpacer baseMargin='2rem' position='bottom' />
</Guard>
</FullPageWrapper>
);
Expand Down

0 comments on commit dc45aa0

Please sign in to comment.