handleClose = () => {
if (this.activeElement) {
- this.activeElement.focus();
+ this.activeElement.focus({ preventScroll: true });
this.activeElement = null;
}
this.props.onClose(this.state.id);
} else {
const { top } = target.getBoundingClientRect();
if (this.state.open && this.activeElement) {
- this.activeElement.focus();
+ this.activeElement.focus({ preventScroll: true });
}
this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });
this.setState({ open: !this.state.open });
handleClose = () => {
if (this.state.open && this.activeElement) {
- this.activeElement.focus();
+ this.activeElement.focus({ preventScroll: true });
}
this.setState({ open: false });
}