Change: スマホから公開範囲などの選択肢を表示するときのデザインを調整 (#508)
This commit is contained in:
parent
c75a3721a1
commit
3762dd6249
5 changed files with 74 additions and 16 deletions
|
@ -148,11 +148,21 @@ class CircleDropdown extends PureComponent {
|
|||
};
|
||||
|
||||
handleToggle = () => {
|
||||
if (this.state.open && this.activeElement) {
|
||||
this.activeElement.focus({ preventScroll: true });
|
||||
if (this.props.isUserTouching && this.props.isUserTouching()) {
|
||||
if (this.state.open) {
|
||||
this.props.onModalClose();
|
||||
} else {
|
||||
this.props.onModalOpen({
|
||||
actions: this.options.map(option => ({ ...option, active: option.value === this.props.circleId })),
|
||||
onClick: this.handleModalActionClick,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (this.state.open && this.activeElement) {
|
||||
this.activeElement.focus({ preventScroll: true });
|
||||
}
|
||||
this.setState({ open: !this.state.open });
|
||||
}
|
||||
|
||||
this.setState({ open: !this.state.open });
|
||||
};
|
||||
|
||||
handleModalActionClick = (e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue