handsontable 0.0.0-next-dc31c83-20240131 → 0.0.0-next-95bb75e-20240131
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/core.d.ts +1 -1
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +367 -305
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +7 -7
- package/dist/handsontable.js +367 -305
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +25 -25
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/moves.js +86 -0
- package/helpers/moves.mjs +82 -0
- package/package.json +1 -1
- package/plugins/formulas/indexSyncer/axisSyncer.js +2 -74
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +2 -74
- package/plugins/undoRedo/undoRedo.js +61 -14
- package/plugins/undoRedo/undoRedo.mjs +61 -14
- package/tableView.js +5 -10
- package/tableView.mjs +6 -11
package/tableView.mjs
CHANGED
@@ -12,7 +12,7 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
|
|
12
12
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
13
13
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
14
14
|
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; } }
|
15
|
-
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute
|
15
|
+
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute } from "./helpers/dom/element.mjs";
|
16
16
|
import EventManager from "./eventManager.mjs";
|
17
17
|
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
18
18
|
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
@@ -303,13 +303,15 @@ class TableView {
|
|
303
303
|
const {
|
304
304
|
rootElement,
|
305
305
|
rootDocument,
|
306
|
-
selection
|
307
|
-
rootWindow
|
306
|
+
selection
|
308
307
|
} = this.hot;
|
309
308
|
const documentElement = rootDocument.documentElement;
|
310
309
|
this.eventManager.addEventListener(rootElement, 'mousedown', event => {
|
311
310
|
_classPrivateFieldSet(this, _selectionMouseDown, true);
|
312
311
|
if (!this.isTextSelectionAllowed(event.target)) {
|
312
|
+
const {
|
313
|
+
rootWindow
|
314
|
+
} = this.hot;
|
313
315
|
clearTextSelection(rootWindow);
|
314
316
|
event.preventDefault();
|
315
317
|
rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
|
@@ -322,7 +324,7 @@ class TableView {
|
|
322
324
|
if (_classPrivateFieldGet(this, _selectionMouseDown) && !this.isTextSelectionAllowed(event.target)) {
|
323
325
|
// Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
|
324
326
|
if (this.settings.fragmentSelection) {
|
325
|
-
clearTextSelection(rootWindow);
|
327
|
+
clearTextSelection(this.hot.rootWindow);
|
326
328
|
}
|
327
329
|
event.preventDefault();
|
328
330
|
}
|
@@ -402,13 +404,6 @@ class TableView {
|
|
402
404
|
this.hot.destroyEditor(false, false);
|
403
405
|
}
|
404
406
|
});
|
405
|
-
let parentWindow = getParentWindow(rootWindow);
|
406
|
-
while (parentWindow !== null) {
|
407
|
-
this.eventManager.addEventListener(parentWindow.document.documentElement, 'click', () => {
|
408
|
-
this.hot.unlisten();
|
409
|
-
});
|
410
|
-
parentWindow = getParentWindow(parentWindow);
|
411
|
-
}
|
412
407
|
this.eventManager.addEventListener(_classPrivateFieldGet(this, _table), 'selectstart', event => {
|
413
408
|
if (this.settings.fragmentSelection || isInput(event.target)) {
|
414
409
|
return;
|