Remove .p-unselectable-text

This commit is contained in:
tugcekucukoglu 2024-05-13 17:26:45 +03:00
parent d06ef16b81
commit 4455d6ec59
5 changed files with 10 additions and 13 deletions

View file

@ -307,7 +307,7 @@ export default {
this.container.style.margin = '0';
document.body.setAttribute('data-p-unselectable-text', 'true');
!this.isUnstyled && DomHandler.addClass(document.body, 'p-unselectable-text');
!this.isUnstyled && DomHandler.addStyles(document.body, { 'user-select': 'none' });
}
},
bindGlobalListeners() {
@ -374,7 +374,7 @@ export default {
if (this.dragging) {
this.dragging = false;
document.body.removeAttribute('data-p-unselectable-text');
!this.isUnstyled && DomHandler.removeClass(document.body, 'p-unselectable-text');
!this.isUnstyled && (document.body.style['user-select'] = '');
this.$emit('dragend', event);
}