Remove .p-unselectable-text
parent
d06ef16b81
commit
4455d6ec59
|
@ -7,10 +7,6 @@ const theme = ({ dt }) => `
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.p-unselectable-text {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Non vue overlay animations */
|
||||
.p-connected-overlay {
|
||||
opacity: 0;
|
||||
|
|
|
@ -1231,7 +1231,7 @@ export default {
|
|||
let containerLeft = DomHandler.getOffset(this.$el).left;
|
||||
|
||||
this.$el.setAttribute('data-p-unselectable-text', 'true');
|
||||
!this.isUnstyled && DomHandler.addClass(this.$el, 'p-unselectable-text');
|
||||
!this.isUnstyled && DomHandler.addStyles(this.$el, { 'user-select': 'none' });
|
||||
this.$refs.resizeHelper.style.height = this.$el.offsetHeight + 'px';
|
||||
this.$refs.resizeHelper.style.top = 0 + 'px';
|
||||
this.$refs.resizeHelper.style.left = event.pageX - containerLeft + this.$el.scrollLeft + 'px';
|
||||
|
@ -1281,7 +1281,7 @@ export default {
|
|||
this.$refs.resizeHelper.style.display = 'none';
|
||||
this.resizeColumn = null;
|
||||
this.$el.removeAttribute('data-p-unselectable-text');
|
||||
!this.isUnstyled && DomHandler.removeClass(this.$el, 'p-unselectable-text');
|
||||
!this.isUnstyled && (this.$el.style['user-select'] = '');
|
||||
|
||||
this.unbindColumnResizeEvents();
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
:data-p-highlight="isColumnSorted()"
|
||||
:data-p-frozen-column="columnProp('frozen')"
|
||||
>
|
||||
<div :class="cx('columnHeaderContent')" v-bind="getColumnPT('columnHeaderContent')">
|
||||
<span v-if="resizableColumns && !columnProp('frozen')" :class="cx('columnResizer')" @mousedown="onResizeStart" v-bind="getColumnPT('columnResizer')"></span>
|
||||
<div :class="cx('columnHeaderContent')" v-bind="getColumnPT('columnHeaderContent')">
|
||||
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
|
||||
<span v-if="columnProp('header')" :class="cx('columnTitle')" v-bind="getColumnPT('columnTitle')">{{ columnProp('header') }}</span>
|
||||
<span v-if="columnProp('sortable')" v-bind="getColumnPT('sort')">
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
:sortOrder="d_sortOrder"
|
||||
:multiSortMeta="d_multiSortMeta"
|
||||
:sortMode="sortMode"
|
||||
@column-click="onColumnHeaderClick"
|
||||
@column-resizestart="onColumnResizeStart"
|
||||
@column-click="onColumnHeaderClick($event)"
|
||||
@column-resizestart="onColumnResizeStart($event)"
|
||||
:index="i"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
|
@ -388,6 +388,7 @@ export default {
|
|||
if (
|
||||
DomHandler.getAttribute(targetNode, 'data-p-sortable-column') === true ||
|
||||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'columntitle' ||
|
||||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'columnheadercontent' ||
|
||||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'sorticon' ||
|
||||
DomHandler.getAttribute(targetNode.parentElement, 'data-pc-section') === 'sorticon' ||
|
||||
DomHandler.getAttribute(targetNode.parentElement.parentElement, 'data-pc-section') === 'sorticon' ||
|
||||
|
@ -624,7 +625,7 @@ export default {
|
|||
let containerLeft = DomHandler.getOffset(this.$el).left;
|
||||
|
||||
this.$el.setAttribute('data-p-unselectable-text', 'true');
|
||||
!this.isUnstyled && DomHandler.addClass(this.$el, 'p-unselectable-text');
|
||||
!this.isUnstyled && DomHandler.addStyles(this.$el, { 'user-select': 'none' });
|
||||
this.$refs.resizeHelper.style.height = this.$el.offsetHeight + 'px';
|
||||
this.$refs.resizeHelper.style.top = 0 + 'px';
|
||||
this.$refs.resizeHelper.style.left = event.pageX - containerLeft + this.$el.scrollLeft + 'px';
|
||||
|
@ -666,7 +667,7 @@ export default {
|
|||
this.$refs.resizeHelper.style.display = 'none';
|
||||
this.resizeColumn = null;
|
||||
this.$el.removeAttribute('data-p-unselectable-text');
|
||||
!this.isUnstyled && DomHandler.removeClass(this.$el, 'p-unselectable-text');
|
||||
!this.isUnstyled && (this.$el.style['user-select'] = '');
|
||||
|
||||
this.unbindColumnResizeEvents();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue