Skip to content

Commit

Permalink
fix issue with displaying message menu in mobile chat
Browse files Browse the repository at this point in the history
  • Loading branch information
budnik9 committed Nov 6, 2023
1 parent 3c8bd77 commit 429f840
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
overscroll-behavior: contain;
display: flex;
flex-direction: column-reverse;
padding: 0.5rem 2rem var(--chat-input-wrapper-height) 2rem;
padding: 0.5rem 2rem 0 2rem;
margin-bottom: var(--chat-input-wrapper-height);

@include big-phone {
margin-bottom: 0;
}
}

.emptyChat {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/common/components/ChatComponent/ChatComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default function ChatComponent({
const chatWrapperId = useMemo(() => `chat-wrapper-${uuidv4()}`, []);
const chatInputWrapperRef = useRef<HTMLDivElement>(null);
const chatContainerRef = useRef<HTMLDivElement>(null);
const [isScrolling, setScrolling] = useState(false);
const [isScrolling, setIsScrolling] = useState(false);
const chatContentContextValue: ChatContentData = useMemo(
() => ({
isScrolling,
Expand Down Expand Up @@ -603,11 +603,11 @@ export default function ChatComponent({

useEffect(() => {
const deactivateScrollingFlag = debounce(() => {
setScrolling(false);
setIsScrolling(false);
}, 300);

function handleScroll() {
setScrolling(true);
setIsScrolling(true);
deactivateScrollingFlag();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import "../../../../../../constants";

.modal {
height: 90vh;

.modalHeaderWrapper {
padding: 0;

Expand Down

0 comments on commit 429f840

Please sign in to comment.