Skip to content

Commit

Permalink
2307 Clicking edit icon for node label causes node selection instead …
Browse files Browse the repository at this point in the history
…of openeing label for edit

Signed-off-by: CTomlyn <[email protected]>
  • Loading branch information
tomlyn committed Jan 16, 2025
1 parent 84ce953 commit 3169907
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,6 @@ export default class CanvasController {

} else if (!this.mouseInContextToolbar && !this.mouseInObject) {
this.objectModel.closeContextMenu();
this.setFocusOnCanvas();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ export default class SVGCanvasRenderer {
}
})
.on("mouseenter", (d3Event, d) => {
if (this.isDragging()) {
if (this.isDragging() || this.svgCanvasTextArea.isEditingText()) {
return;
}

Expand Down Expand Up @@ -2505,7 +2505,11 @@ export default class SVGCanvasRenderer {
that.mouseOverLabelEditIcon = false;
that.hideEditIcon(this);
})
.on("mousedown mouseup", function(d3Event) {
CanvasUtils.stopPropagationAndPreventDefault(d3Event);
})
.on("click", function(d3Event, d) {
CanvasUtils.stopPropagationAndPreventDefault(d3Event);
displayTextArea(d3Event, d);
that.mouseOverLabelEditIcon = false;
that.hideEditIcon(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,8 @@ export default class SvgCanvasTextArea {
this.logger.log("Text area - focus");
data.autoSizeCallback(d3Event.target, data);
})
.on("mousedown click dblclick contextmenu", (d3Event, d) => {
.on("mousedown mouseenter mouseleave click dblclick contextmenu", (d3Event, d) => {
console.log("mouseenter etc");

Check warning on line 884 in canvas_modules/common-canvas/src/common-canvas/svg-canvas-utils-textarea.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
d3Event.stopPropagation(); // Allow default behavior to show system contenxt menu
});
}
Expand Down

0 comments on commit 3169907

Please sign in to comment.