handsontable 0.0.0-next-8b47293-20230904 → 0.0.0-next-4fc3f83-20230908
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +23 -14
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +4 -4
- package/dist/handsontable.js +23 -14
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/editors/baseEditor/baseEditor.js +16 -7
- package/editors/baseEditor/baseEditor.mjs +16 -7
- package/helpers/dom/element.js +1 -1
- package/helpers/dom/element.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/tableView.js +1 -1
- package/tableView.mjs +2 -2
@@ -492,21 +492,30 @@ class BaseEditor {
|
|
492
492
|
const horizontalScrollPosition = Math.abs(wtOverlays.inlineStartOverlay.getScrollPosition());
|
493
493
|
const verticalScrollPosition = wtOverlays.topOverlay.getScrollPosition();
|
494
494
|
const scrollbarWidth = (0, _element.getScrollbarWidth)(this.hot.rootDocument);
|
495
|
-
|
496
|
-
|
495
|
+
let cellTopOffset = TD.offsetTop;
|
496
|
+
if (['inline_start', 'master'].includes(overlayName)) {
|
497
|
+
cellTopOffset += firstRowOffset - verticalScrollPosition;
|
498
|
+
}
|
499
|
+
if (['bottom', 'bottom_inline_start_corner'].includes(overlayName)) {
|
500
|
+
const {
|
501
|
+
wtViewport: bottomWtViewport,
|
502
|
+
wtTable: bottomWtTable
|
503
|
+
} = wtOverlays.bottomOverlay.clone;
|
504
|
+
cellTopOffset += bottomWtViewport.getWorkspaceHeight() - bottomWtTable.getHeight() - scrollbarWidth;
|
505
|
+
}
|
506
|
+
let cellStartOffset = TD.offsetLeft;
|
497
507
|
if (this.hot.isRtl()) {
|
498
|
-
|
499
|
-
if (cellOffset >= 0) {
|
508
|
+
if (cellStartOffset >= 0) {
|
500
509
|
cellStartOffset = overlayTable.getWidth() - TD.offsetLeft;
|
501
510
|
} else {
|
502
511
|
// The `offsetLeft` returns negative values when the parent offset element has position relative
|
503
512
|
// (it happens when on the cell the selection is applied - the `area` CSS class).
|
504
513
|
// When it happens the `offsetLeft` value is calculated from the right edge of the parent element.
|
505
|
-
cellStartOffset = Math.abs(
|
514
|
+
cellStartOffset = Math.abs(cellStartOffset);
|
506
515
|
}
|
507
516
|
cellStartOffset += firstColumnOffset - horizontalScrollPosition - cellWidth;
|
508
|
-
} else {
|
509
|
-
cellStartOffset
|
517
|
+
} else if (['top', 'master', 'bottom'].includes(overlayName)) {
|
518
|
+
cellStartOffset += firstColumnOffset - horizontalScrollPosition;
|
510
519
|
}
|
511
520
|
const cellComputedStyle = (0, _element.getComputedStyle)(this.TD, this.hot.rootWindow);
|
512
521
|
const borderPhysicalWidthProp = this.hot.isRtl() ? 'borderRightWidth' : 'borderLeftWidth';
|
@@ -485,21 +485,30 @@ export class BaseEditor {
|
|
485
485
|
const horizontalScrollPosition = Math.abs(wtOverlays.inlineStartOverlay.getScrollPosition());
|
486
486
|
const verticalScrollPosition = wtOverlays.topOverlay.getScrollPosition();
|
487
487
|
const scrollbarWidth = getScrollbarWidth(this.hot.rootDocument);
|
488
|
-
|
489
|
-
|
488
|
+
let cellTopOffset = TD.offsetTop;
|
489
|
+
if (['inline_start', 'master'].includes(overlayName)) {
|
490
|
+
cellTopOffset += firstRowOffset - verticalScrollPosition;
|
491
|
+
}
|
492
|
+
if (['bottom', 'bottom_inline_start_corner'].includes(overlayName)) {
|
493
|
+
const {
|
494
|
+
wtViewport: bottomWtViewport,
|
495
|
+
wtTable: bottomWtTable
|
496
|
+
} = wtOverlays.bottomOverlay.clone;
|
497
|
+
cellTopOffset += bottomWtViewport.getWorkspaceHeight() - bottomWtTable.getHeight() - scrollbarWidth;
|
498
|
+
}
|
499
|
+
let cellStartOffset = TD.offsetLeft;
|
490
500
|
if (this.hot.isRtl()) {
|
491
|
-
|
492
|
-
if (cellOffset >= 0) {
|
501
|
+
if (cellStartOffset >= 0) {
|
493
502
|
cellStartOffset = overlayTable.getWidth() - TD.offsetLeft;
|
494
503
|
} else {
|
495
504
|
// The `offsetLeft` returns negative values when the parent offset element has position relative
|
496
505
|
// (it happens when on the cell the selection is applied - the `area` CSS class).
|
497
506
|
// When it happens the `offsetLeft` value is calculated from the right edge of the parent element.
|
498
|
-
cellStartOffset = Math.abs(
|
507
|
+
cellStartOffset = Math.abs(cellStartOffset);
|
499
508
|
}
|
500
509
|
cellStartOffset += firstColumnOffset - horizontalScrollPosition - cellWidth;
|
501
|
-
} else {
|
502
|
-
cellStartOffset
|
510
|
+
} else if (['top', 'master', 'bottom'].includes(overlayName)) {
|
511
|
+
cellStartOffset += firstColumnOffset - horizontalScrollPosition;
|
503
512
|
}
|
504
513
|
const cellComputedStyle = getComputedStyle(this.TD, this.hot.rootWindow);
|
505
514
|
const borderPhysicalWidthProp = this.hot.isRtl() ? 'borderRightWidth' : 'borderLeftWidth';
|
package/helpers/dom/element.js
CHANGED
@@ -391,7 +391,7 @@ function isVisible(element) {
|
|
391
391
|
} else {
|
392
392
|
return false; // this is a node detached from document in IE8
|
393
393
|
}
|
394
|
-
} else if (next.
|
394
|
+
} else if (getComputedStyle(next).display === 'none') {
|
395
395
|
return false;
|
396
396
|
}
|
397
397
|
next = next.parentNode;
|
package/helpers/dom/element.mjs
CHANGED
@@ -338,7 +338,7 @@ export function isVisible(element) {
|
|
338
338
|
} else {
|
339
339
|
return false; // this is a node detached from document in IE8
|
340
340
|
}
|
341
|
-
} else if (next.
|
341
|
+
} else if (getComputedStyle(next).display === 'none') {
|
342
342
|
return false;
|
343
343
|
}
|
344
344
|
next = next.parentNode;
|
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-4fc3f83-20230908";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-4fc3f83-20230908";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-4fc3f83-20230908",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
package/tableView.js
CHANGED
@@ -670,7 +670,7 @@ class TableView {
|
|
670
670
|
}
|
671
671
|
},
|
672
672
|
onContainerElementResize: () => {
|
673
|
-
if (this.instance && !this.instance.isDestroyed) {
|
673
|
+
if (this.instance && !this.instance.isDestroyed && (0, _element.isVisible)(this.instance.rootElement)) {
|
674
674
|
this.instance.refreshDimensions();
|
675
675
|
}
|
676
676
|
},
|
package/tableView.mjs
CHANGED
@@ -10,7 +10,7 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
|
|
10
10
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
11
11
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
12
12
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
13
|
-
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput } from "./helpers/dom/element.mjs";
|
13
|
+
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible } from "./helpers/dom/element.mjs";
|
14
14
|
import EventManager from "./eventManager.mjs";
|
15
15
|
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
16
16
|
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
@@ -666,7 +666,7 @@ class TableView {
|
|
666
666
|
}
|
667
667
|
},
|
668
668
|
onContainerElementResize: () => {
|
669
|
-
if (this.instance && !this.instance.isDestroyed) {
|
669
|
+
if (this.instance && !this.instance.isDestroyed && isVisible(this.instance.rootElement)) {
|
670
670
|
this.instance.refreshDimensions();
|
671
671
|
}
|
672
672
|
},
|