@worktile/theia 2.3.0-next.3 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/worktile-theia.umd.js +8 -4
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +7 -4
- package/esm2015/utils/dom.js +5 -3
- package/fesm2015/worktile-theia.js +8 -4
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/styles/editor.scss +3 -4
- package/styles/typo.scss +6 -0
|
@@ -2644,8 +2644,10 @@
|
|
|
2644
2644
|
var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
|
|
2645
2645
|
var rectEditable = editableElement.getBoundingClientRect();
|
|
2646
2646
|
if (x > rectEditable.x && x < rectEditable.x + rectEditable.width) {
|
|
2647
|
-
var
|
|
2648
|
-
var
|
|
2647
|
+
var paddingLeft = window.getComputedStyle(editableElement, null).paddingLeft;
|
|
2648
|
+
var paddingLeftPixels = coercePixelsFromCssValue(paddingLeft);
|
|
2649
|
+
var startX = rectEditable.left + paddingLeftPixels;
|
|
2650
|
+
var relativeElement = document.elementFromPoint(mode === 'highest' ? startX : x, y);
|
|
2649
2651
|
return relativeElement;
|
|
2650
2652
|
}
|
|
2651
2653
|
return null;
|
|
@@ -13292,10 +13294,12 @@
|
|
|
13292
13294
|
var _a;
|
|
13293
13295
|
var editor = this.editor;
|
|
13294
13296
|
if (editor === null || editor === void 0 ? void 0 : editor.selection) {
|
|
13297
|
+
var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
|
|
13298
|
+
var paddingLeft = window.getComputedStyle(editableElement, null).paddingLeft;
|
|
13299
|
+
var paddingLeftPixels = coercePixelsFromCssValue(paddingLeft);
|
|
13295
13300
|
var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
13296
13301
|
var rootNode = i1.AngularEditor.toDOMNode(editor, block);
|
|
13297
|
-
|
|
13298
|
-
return (firstElementChild === null || firstElementChild === void 0 ? void 0 : firstElementChild.offsetLeft) > 0;
|
|
13302
|
+
return rootNode.offsetLeft > paddingLeftPixels;
|
|
13299
13303
|
}
|
|
13300
13304
|
return false;
|
|
13301
13305
|
};
|