Answer the question
In order to leave comments, you need to log in
Why doesn't the function for the onClickCapture event fire on ios under 13?
my component
<div className={'popup-overlay', styles.overlay} onClickCapture={this.handleOverlayClick}>
<div id="popup" ></div>
</div>
handleOverlayClick(e) {
let parent = e.target;
let shouldClose = true;
while (parent && shouldClose && !parent.classList.contains('popup-overlay')) {
if (parent.classList && parent.classList.contains('popup')) {
shouldClose = false;
}
parent = parent.parentNode;
}
if (shouldClose) {
this.handleOnClose();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question