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