Describe the Bug
When editing a header of an input field in a decision table through the Browser Mozilla Firefox (newest version) the input field is already populated with a br-tag. As a result the user starts typing in the second line. The extra tag is also present in other browser, but e.g. ignored in Browser Google Chrome.
Steps to Reproduce
Open a decision table and try editing an empty header of an input field through using the Browser Mozilla Firefox.
Describe the Bug When editing a header of an input field in a decision table through the Browser Mozilla Firefox (newest version) the input field is already populated with a br-tag. As a result the user starts typing in the second line. The extra
tag is also present in other browser, but e.g. ignored in Browser Google Chrome.
Steps to Reproduce Open a decision table and try editing an empty header of an input field through using the Browser Mozilla Firefox.
Bug can be reproduced at https://demo.bpmn.io/dmn
Expected Behavior There is no extra br-tag created if the header of an input field is empty.
I believe that the following code fragment is creating the problem in https://github.com/bpmn-io/dmn-js/blob/master/packages/dmn-js-shared/src/components/ContentEditable.js
// QUIRK: must add trailing <br/> for line // breaks to properly work value = escapeHtml(value) .replace(/\r?\n/g, '<br/>') + '<br/>';
Probably a simply if-statement checking if value is empty should be enough before adding a trailing br-tag.
Environment