diff --git a/src/components/consent-notice.jsx b/src/components/consent-notice.jsx index a9226ac2..5665ef4a 100644 --- a/src/components/consent-notice.jsx +++ b/src/components/consent-notice.jsx @@ -13,6 +13,12 @@ export default class ConsentNotice extends React.Component { }; } + componentDidMount() { + if (this.props.config.autoFocus && this.noticeRef) { + this.noticeRef.focus() + } + } + componentDidUpdate(prevProps) { if (prevProps.modal !== this.props.modal) this.setState({ modal: this.props.modal });