Skip to content

Commit

Permalink
Table : fix table draggable
Browse files Browse the repository at this point in the history
when a horizontal scroll bar appears on the page and the position of the El table needs to be scrolled horizontally to be displayed, the whole header of the table becomes draggable. 
#21425
  • Loading branch information
wangdaodao committed Nov 2, 2021
1 parent d1e0eb2 commit 5a2c08b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/table/src/table-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export default {
let rect = target.getBoundingClientRect();

const bodyStyle = document.body.style;
if (rect.width > 12 && rect.right - event.pageX < 8) {
if (rect.width > 12 && rect.right - event.clientX < 8) {
bodyStyle.cursor = 'col-resize';
if (hasClass(target, 'is-sortable')) {
target.style.cursor = 'col-resize';
Expand Down

0 comments on commit 5a2c08b

Please sign in to comment.