devexpress-richedit 24.2.5-build-25037-0102 → 24.2.5
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.
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Browser } from '@devexpress/utils/lib/browser';
|
2
1
|
export class FocusManager {
|
3
2
|
constructor(canvasManager, owner, inputController, eventManager) {
|
4
3
|
this.canvasManager = canvasManager;
|
@@ -18,9 +17,7 @@ export class FocusManager {
|
|
18
17
|
captureFocus() {
|
19
18
|
if (this.owner.canCaptureFocus()) {
|
20
19
|
this.owner.onCaptureFocus();
|
21
|
-
|
22
|
-
Browser.MacOSMobilePlatform && window.self !== window.top)
|
23
|
-
this.inputController.captureFocus();
|
20
|
+
this.inputController.captureFocus();
|
24
21
|
this.eventManager.onFocusIn();
|
25
22
|
}
|
26
23
|
}
|
@@ -119,7 +119,7 @@ export declare class IFrameInputEditor extends InputEditorBase<HTMLIFrameElement
|
|
119
119
|
initEvents(): void;
|
120
120
|
private isModifyEnabled;
|
121
121
|
captureFocus(): void;
|
122
|
-
setPosition(left: number, top: number): void;
|
122
|
+
setPosition(left: number, top: number, force?: boolean): void;
|
123
123
|
clearInputElement(): void;
|
124
124
|
setEditableDocumentContent(content: string | NodeListOf<ChildNode>): void;
|
125
125
|
getEditableDocumentContent(): string | NodeListOf<ChildNode>;
|
@@ -410,15 +410,16 @@ export class DivInputEditor extends InputEditorBase {
|
|
410
410
|
this.cursorWasSetOnLastPosition = true;
|
411
411
|
}
|
412
412
|
setEditableDocumentContent(content) {
|
413
|
+
if (!content) {
|
414
|
+
this.clearInputElement();
|
415
|
+
return;
|
416
|
+
}
|
413
417
|
if (typeof content === "string")
|
414
418
|
this.inputElement.innerHTML = content;
|
415
|
-
else
|
419
|
+
else {
|
416
420
|
this.inputElement.innerHTML = "";
|
417
|
-
|
418
|
-
this.inputElement.appendChild(content[i]);
|
421
|
+
content.forEach((node) => this.inputElement.appendChild(node));
|
419
422
|
}
|
420
|
-
else
|
421
|
-
this.clearInputElement();
|
422
423
|
}
|
423
424
|
setEditableDocumentCursorPosition(cursorPosition) {
|
424
425
|
let textLength = this.getEditableDocumentFullText().length;
|
@@ -587,8 +588,9 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
587
588
|
else
|
588
589
|
DomUtils.setFocus(this.control.readOnly == ReadOnlyMode.Persistent ? this.inputElement : this.editableDocument.body);
|
589
590
|
}
|
590
|
-
setPosition(left, top) {
|
591
|
-
|
591
|
+
setPosition(left, top, force = false) {
|
592
|
+
if (this.IMEState === IMEState.None || force)
|
593
|
+
super.setPosition(left, top);
|
592
594
|
if (left && top)
|
593
595
|
this.selectEditableDocumentContent();
|
594
596
|
}
|
@@ -723,11 +725,12 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
723
725
|
const layoutPoint = new LayoutPoint(layoutPosition.pageIndex, layoutX, layoutPosition.getLayoutY(DocumentLayoutDetailsLevel.Row));
|
724
726
|
const pageElement = this.control.viewManager.cache[layoutPoint.pageIndex].page;
|
725
727
|
layoutPoint.offset(pageElement.offsetLeft, pageElement.offsetTop);
|
726
|
-
this.setPosition(layoutPoint.x, layoutPoint.y);
|
728
|
+
this.setPosition(layoutPoint.x, layoutPoint.y, true);
|
727
729
|
this.editableDocument.body.style.textIndent = this.previousText.length ? currentTextIndent :
|
728
730
|
layoutPosition.getLayoutX(this.control.measurer, DocumentLayoutDetailsLevel.Box) +
|
729
731
|
layoutPosition.box.getCharOffsetXInPixels(this.control.measurer, layoutPosition.charOffset) - layoutX + "px";
|
730
732
|
this.inputElement.style.width = layoutPosition.row.width + "px";
|
733
|
+
this.inputElement.style.minWidth = layoutPosition.row.width + "px";
|
731
734
|
if (Browser.IE || Browser.Edge) {
|
732
735
|
this.editableDocument.body.style.width = this.inputElement.style.width;
|
733
736
|
this.editableDocument.body.style.height = this.inputElement.style.height = layoutPosition.row.height + "px";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.2.5
|
3
|
+
"version": "24.2.5",
|
4
4
|
"homepage": "https://www.devexpress.com/",
|
5
5
|
"bugs": "https://www.devexpress.com/support/",
|
6
6
|
"author": "Developer Express Inc.",
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
|
15
15
|
},
|
16
16
|
"peerDependencies": {
|
17
|
-
"devextreme": "24.2.5
|
18
|
-
"devextreme-dist": "24.2.5
|
17
|
+
"devextreme": "24.2.5",
|
18
|
+
"devextreme-dist": "24.2.5"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|