drawio icon indicating copy to clipboard operation
drawio copied to clipboard

Line-height breaks placeholders

Open rubenvandeven opened this issue 5 years ago • 4 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug

When using line-height or another style property with percentage sign, placeholders don't work anymore.

Or, percentage signs in style attributes should be ignored for placeholders.

To Reproduce Steps to reproduce the behavior:

  1. create text node with %test%
  2. Ctrl+m and add property test with any value to your liking, make sure to check "placeholders" checkbox. Click Apply
  3. Placeholder work for now.
  4. Double click text box, to select. Then single click to deselect but keep cursor.
  5. In text properties, adjust line height.
  6. Placeholder now breaks (only %test% is shown)

Workaround:

  1. Extra -> Edit Diagram ...
  2. Replace the set line-height (which has a percentage value), with a value defined as px or pt.
  3. Ok
  4. Placeholder works again.

Expected behavior Placeholder should have been replaced.

draw.io version

  • draw.io version 15.1.3 on linux desktop and 15.3.4 on chromium

Desktop (please complete the following information):

  • OS: Linux
  • Browser Chromium
  • Version 93.0.4577.82

rubenvandeven avatar Sep 30 '21 18:09 rubenvandeven

Quick workaround for the GUI: change line-height from percentage to a unitless value. (Which is apparently preferred way according to MDN)

rubenvandeven avatar Sep 30 '21 18:09 rubenvandeven

Thanks for the report. This will be fixed in the next release.

alderg avatar Oct 01 '21 04:10 alderg

In 15.4.1

davidjgraph avatar Oct 01 '21 13:10 davidjgraph

That was fast, thanks!

rubenvandeven avatar Oct 01 '21 14:10 rubenvandeven