Skip to content

Commit

Permalink
fix: minor issues on mobile with dropdownMenu and emojiReactMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
Clovis committed Mar 24, 2024
1 parent eb200e3 commit 8635155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions app/soapbox/components/emoji-button-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/interactive-supports-focus */
import { Map as ImmutableMap } from 'immutable';
import React, { useState, useEffect, useRef } from 'react';
import React, { useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import { usePopper } from 'react-popper';
import { useDispatch } from 'react-redux';
Expand Down Expand Up @@ -118,14 +118,13 @@ const EmojiButtonWrapper: React.FC<IEmojiButtonWrapper> = ({ statusId, children


return (
<div ref={root} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} >
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div ref={root} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} onClick={handleClick}>
{ children}
{
visible && (
ReactDOM.createPortal((
<div
role='menu'
onClick={handleClick}
className='z-50 transition-opacity duration-100'
ref={setPopperElement}
style={styles.popper}
Expand Down
4 changes: 2 additions & 2 deletions app/soapbox/components/modal_root.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ class ModalRoot extends React.PureComponent {
<div
role='dialog'
className={classNames({
'h-full my-2 mx-auto relative pointer-events-none flex items-center': true,
'p-4 md:p-0': type !== 'MEDIA',
'h-full mx-auto relative pointer-events-none flex items-center': true,
'md:p-0': type !== 'MEDIA',
})}
style={{ minHeight: 'calc(100% - 3.5rem)' }}
>
Expand Down

0 comments on commit 8635155

Please sign in to comment.