Skip to content

Commit

Permalink
Diagram - prevent unexpected cancel text editing if the toolbox or pr…
Browse files Browse the repository at this point in the history
…operties panel is visible (#12822)
  • Loading branch information
Roman Rodin authored Apr 22, 2020
1 parent a592a49 commit cbd414f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions js/ui/diagram/ui.diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class Diagram extends Widget {
}
},
onVisibilityChanged: (e) => {
if(!e.visible) {
if(!e.visible && !this._textInputStarted) {
this._diagramCaptureFocus();
}

Expand Down Expand Up @@ -521,7 +521,7 @@ class Diagram extends Widget {
}
},
onVisibilityChanged: (e) => {
if(!e.visible) {
if(!e.visible && !this._textInputStarted) {
this._diagramCaptureFocus();
}
},
Expand Down Expand Up @@ -2136,6 +2136,7 @@ class Diagram extends Widget {
}
}
_raiseTextInputStart() {
this._textInputStarted = true;
if(this._propertiesPanel) {
if(this.isMobileScreenSize() && this._propertiesPanel.isVisible()) {
this._propertiesPanel.hide();
Expand All @@ -2162,6 +2163,7 @@ class Diagram extends Widget {
delete this._toolboxTextInputHidden;
}
}
this._textInputStarted = false;
}

_createItemClickAction() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"types": "./bundles/dx.all.d.ts",
"license": "SEE LICENSE IN README.md",
"dependencies": {
"devexpress-diagram": "0.2.45",
"devexpress-diagram": "0.2.46",
"devexpress-gantt": "0.1.21",
"jszip": "^2.0.0 || ^3.0.0",
"quill": "^1.3.7",
Expand Down

0 comments on commit cbd414f

Please sign in to comment.