Browse Source

Remove hardcoded width from dropdown overlays (#23062)

* Remove hardcoded width from dropdown overlays

* Fix emoji picker position
closed-social-glitch-2
Claire 1 year ago
committed by GitHub
parent
commit
f4a6365f55
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/javascript/mastodon/features/compose/components/language_dropdown.js
  2. +1
    -1
      app/javascript/mastodon/features/compose/components/privacy_dropdown.js
  3. +1
    -1
      app/javascript/styles/mastodon/components.scss

+ 1
- 1
app/javascript/mastodon/features/compose/components/language_dropdown.js View File

@ -307,7 +307,7 @@ class LanguageDropdown extends React.PureComponent {
<Overlay show={open} placement={'bottom'} flip target={this.findTarget} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}>
{({ props, placement }) => (
<div {...props} style={{ ...props.style, width: 280 }}>
<div {...props}>
<div className={`dropdown-animation language-dropdown__dropdown ${placement}`} >
<LanguageDropdownMenu
value={value}

+ 1
- 1
app/javascript/mastodon/features/compose/components/privacy_dropdown.js View File

@ -268,7 +268,7 @@ class PrivacyDropdown extends React.PureComponent {
<Overlay show={open} placement={'bottom'} flip target={this.findTarget} container={container} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}>
{({ props, placement }) => (
<div {...props} style={{ ...props.style, width: 350, maxWidth: '100vw' }}>
<div {...props}>
<div className={`dropdown-animation privacy-dropdown__dropdown ${placement}`}>
<PrivacyDropdownMenu
items={this.options}

+ 1
- 1
app/javascript/styles/mastodon/components.scss View File

@ -4380,7 +4380,7 @@ a.status-card.compact:hover {
.emoji-picker-dropdown__menu {
background: $simple-background-color;
position: absolute;
position: relative;
box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
border-radius: 4px;
margin-top: 5px;

Loading…
Cancel
Save