Merge branch 'fix-privacy-button' into 'develop'
Fix: Change scope button no longer works Closes #986 See merge request soapbox-pub/soapbox-fe!1471
This commit is contained in:
commit
dae21c709c
1 changed files with 3 additions and 2 deletions
|
@ -181,7 +181,7 @@ class PrivacyDropdown extends React.PureComponent {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
handleToggle = ({ target }) => {
|
handleToggle = (e) => {
|
||||||
if (this.props.isUserTouching()) {
|
if (this.props.isUserTouching()) {
|
||||||
if (this.state.open) {
|
if (this.state.open) {
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
|
@ -192,13 +192,14 @@ class PrivacyDropdown extends React.PureComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const { top } = target.getBoundingClientRect();
|
const { top } = e.target.getBoundingClientRect();
|
||||||
if (this.state.open && this.activeElement) {
|
if (this.state.open && this.activeElement) {
|
||||||
this.activeElement.focus();
|
this.activeElement.focus();
|
||||||
}
|
}
|
||||||
this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });
|
this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });
|
||||||
this.setState({ open: !this.state.open });
|
this.setState({ open: !this.state.open });
|
||||||
}
|
}
|
||||||
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleModalActionClick = (e) => {
|
handleModalActionClick = (e) => {
|
||||||
|
|
Loading…
Reference in a new issue