Skip to content

Commit

Permalink
address "Dates not selectable in Shadow DOM #7685"
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jul 12, 2024
1 parent 95f66be commit 55ac1d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class HitDragging {
(
this.disablePointCheck ||
offsetTracker.el.contains(
document.elementFromPoint(
(offsetTracker.el.getRootNode() as unknown as DocumentOrShadowRoot).elementFromPoint(
// add-back origins to get coordinate relative to top-left of window viewport
positionLeft + originLeft - window.scrollX,
positionTop + originTop - window.scrollY,
Expand Down
15 changes: 15 additions & 0 deletions standard/tests/manual/web-component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@
}

</style>
<script>

document.addEventListener('DOMContentLoaded', () => {
const el = document.querySelector('full-calendar')
const api = el.getApi()

api.on('dateClick', (info) => {
console.log('dateClick', info)
})
api.on('select', (info) => {
console.log('selected', info)
})
})

</script>
</head>
<body>

Expand Down

0 comments on commit 55ac1d3

Please sign in to comment.