Skip to content

Commit

Permalink
fix(fullcalendar#7441) - fixed selection on pressing long
Browse files Browse the repository at this point in the history
  • Loading branch information
SlavaGeorgiev committed Aug 29, 2023
1 parent 7481ac9 commit 37bee35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/util/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ export function enableCursor() {

export function preventSelection(el: HTMLElement) {
el.style.userSelect = 'none'
el.style.webkitUserSelect = 'none'
el.addEventListener('selectstart', preventDefault)
}

export function allowSelection(el: HTMLElement) {
el.style.userSelect = ''
el.style.webkitUserSelect = ''
el.removeEventListener('selectstart', preventDefault)
}

Expand Down

0 comments on commit 37bee35

Please sign in to comment.