Skip to content

Commit 072a952

Browse files
authored
Merge branch 'canary' into remove-react-modes-config
2 parents 590aae9 + a9d2f2f commit 072a952

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Bug Report
22
description: Create a bug report for the Next.js core
3-
title: 'Bug Report'
43
labels: 'template: bug'
54
body:
65
- type: markdown

.github/ISSUE_TEMPLATE/2.example_bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Example Bug Report
22
description: Create a bug report for the examples
3-
title: 'Example Bug Report'
43
labels: 'type: example,template: bug'
54
body:
65
- type: markdown

.github/ISSUE_TEMPLATE/3.feature_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Feature Request
22
description: Create a feature request for the Next.js core
3-
title: 'Feature Request'
43
labels: 'template: story'
54
body:
65
- type: markdown

test/integration/link-ref/pages/click-away-race-condition.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ const useClickAway = (ref, onClickAway) => {
1313
el && !el.contains(event.target) && onClickAway(event)
1414
}
1515

16-
document.addEventListener('click', handler)
16+
let timeoutID = setTimeout(() => {
17+
timeoutID = null
18+
document.addEventListener('click', handler)
19+
}, 0)
1720

1821
return () => {
22+
if (timeoutID != null) {
23+
clearTimeout(timeoutID)
24+
}
1925
document.removeEventListener('click', handler)
2026
}
2127
}, [onClickAway, ref])

0 commit comments

Comments
 (0)