@akira-yylm/session-calendar 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/client.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/client.js
CHANGED
|
@@ -1609,7 +1609,14 @@ window.__ModuleLoader__.load({
|
|
|
1609
1609
|
const parts = selected.split('-')
|
|
1610
1610
|
const next = new Date(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]) + step)
|
|
1611
1611
|
setSelected(dayKeyOf(next))
|
|
1612
|
-
if (!sameMonth(month, next))
|
|
1612
|
+
if (!sameMonth(month, next)) {
|
|
1613
|
+
setMonth(monthStartOf(next))
|
|
1614
|
+
// The focused date button belongs to the month being replaced, so it
|
|
1615
|
+
// is unmounted and focus would fall back to the document body — the
|
|
1616
|
+
// next arrow key would then look like it came from outside the card.
|
|
1617
|
+
// Move focus to the card itself before the grid re-renders.
|
|
1618
|
+
card.focus({ preventScroll: true })
|
|
1619
|
+
}
|
|
1613
1620
|
}
|
|
1614
1621
|
document.addEventListener('keydown', onArrow)
|
|
1615
1622
|
return () => { document.removeEventListener('keydown', onArrow) }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akira-yylm/session-calendar",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Session calendar: a month calendar beside the sidebar listing every session created on the selected day, grouped by workspace.",
|
|
6
6
|
"license": "MIT",
|