From 88637f55fb1485b229a46db6a56fdcedc87c90a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 30 May 2022 10:01:52 +0200 Subject: [PATCH] Fix: Change scope button no longer works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/compose/components/privacy_dropdown.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/compose/components/privacy_dropdown.js b/app/soapbox/features/compose/components/privacy_dropdown.js index 9edbd58dc..d6ddf771c 100644 --- a/app/soapbox/features/compose/components/privacy_dropdown.js +++ b/app/soapbox/features/compose/components/privacy_dropdown.js @@ -181,7 +181,7 @@ class PrivacyDropdown extends React.PureComponent { ]; } - handleToggle = ({ target }) => { + handleToggle = (e) => { if (this.props.isUserTouching()) { if (this.state.open) { this.props.onModalClose(); @@ -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) => {