Skip to content

Commit

Permalink
Fix: Change scope button no longer works
Browse files Browse the repository at this point in the history
Signed-off-by: marcin mikołajczak <[email protected]>
  • Loading branch information
mkljczk committed May 30, 2022
1 parent f80256d commit 88637f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/soapbox/features/compose/components/privacy_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class PrivacyDropdown extends React.PureComponent {
];
}

handleToggle = ({ target }) => {
handleToggle = (e) => {
if (this.props.isUserTouching()) {
if (this.state.open) {
this.props.onModalClose();
Expand All @@ -192,13 +192,14 @@ class PrivacyDropdown extends React.PureComponent {
});
}
} else {
const { top } = target.getBoundingClientRect();
const { top } = e.target.getBoundingClientRect();
if (this.state.open && this.activeElement) {
this.activeElement.focus();
}
this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });
this.setState({ open: !this.state.open });
}
e.stopPropagation();
}

handleModalActionClick = (e) => {
Expand Down

0 comments on commit 88637f5

Please sign in to comment.