document.addEventListener('keydown', this.handleKeyDown, false);
document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);
if (this.focusedItem && this.props.openedViaKeyboard) {
- this.focusedItem.focus();
+ this.focusedItem.focus({ preventScroll: true });
}
this.setState({ mounted: true });
}
document.addEventListener('click', this.handleDocumentClick, false);
document.addEventListener('touchend', this.handleDocumentClick, withPassive);
if (this.focusedItem) {
- this.focusedItem.focus();
+ this.focusedItem.focus({ preventScroll: true });
} else {
- this.node.firstChild.focus();
+ this.node.firstChild.focus({ preventScroll: true });
}
this.setState({ mounted: true });
}