You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the inline text editor for the bpmn2.Activity shape in JointJS, pressing the spacebar does not insert a space. This issue prevents users from adding spaces between words, which is essential for proper text formatting. Additionally, sometimes the input behaves erratically.
Steps to reproduce
Add keyboard event linstener.
Insert Activity.
Click activity then press f2 to open inline text editor.
Trying edit activity's label/text. but space bar is not working. Additionally, sometimes the input behaves erratically.
Learn - Inline text editing(v4.0) is have same problem.
Version
JointJS+ 4.0.1
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
What operating system are you seeing the problem on?
Windows
The text was updated successfully, but these errors were encountered:
A simple workaround is to remove the textWrap property from the Activity shape when it is dropped onto the graph from the stencil.
Here's an example of how you can implement this in the initializeStencil function:
initializeStencil() {
// Listen for the 'element:drop' event on the stencil
stencilService.stencil.on('element:drop', (elementView: joint.dia.ElementView) => {
// Check if the dropped element is of the BPMN2 type
const elementType = elementView.model.get('type');
if (elementType && elementType.includes('bpmn2')) {
// Remove the 'textWrap' property to address the issue
elementView.model.removeAttr('label/textWrap');
}
// Reset the selection to the dropped element
this.selection.collection.reset([elementView.model]);
});
}
NOTE:
By removing the textWrap property, the text associated with the Activity shape will no longer remain confined within the shape, potentially overflowing outside of it. If preserving text wrapping is essential, consider exploring alternative fixes for this issue.
Current versus expected behaviour
When using the inline text editor for the bpmn2.Activity shape in JointJS, pressing the spacebar does not insert a space. This issue prevents users from adding spaces between words, which is essential for proper text formatting. Additionally, sometimes the input behaves erratically.
Steps to reproduce
Version
JointJS+ 4.0.1
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
What operating system are you seeing the problem on?
Windows
The text was updated successfully, but these errors were encountered: