(구)safari에서는 버튼이 아닌 element를 클릭 시, FocusEvent의 relatedTarget이 null을 갖는다.
const handleTextEditorBlur = (event: FocusEvent) => {
const relatedTarget = event.relatedTarget as HTMLElement;
console.log(relatedTarget); // null in safari
}
해결방법
클릭을 받는 element에 tabIndex = 1 을 주면 된다.
'JavaScript > Error' 카테고리의 다른 글
| rollup으로 번들한 모듈 Can't resolve ./index.scss (0) | 2021.07.29 |
|---|---|
| IE Object doesn't support property or method 'assign' (0) | 2020.08.13 |
| [webpack] file-loader 와 url-loader 가 작동 안하는 이슈 해결 방법 (0) | 2020.02.04 |
| TypeError: Cannot read property 'range' of null (0) | 2019.09.25 |
| [webpack] Invalid Host header (0) | 2019.09.09 |