ContentEdit icon indicating copy to clipboard operation
ContentEdit copied to clipboard

Wrong selection used to apply bold/italic

Open magiksd opened this issue 6 years ago • 6 comments

Hello, I'm currently implementing your awesome tool in my CMS, but I encountered a weird bug when simply applying a bold or italic on text.

See it by yourself on the demo :

  1. Start a new paragraph
  2. Write "aaaaa bbbbb"
  3. Select "bbbbb"
  4. Set it bold or italic
  5. Bug happen

Another way to see it :

  1. Start a new paragraph
  2. Write "aaaaa bbbbb"
  3. Set bold to "aaaaa"
  4. Set italic to "bbbbb"
  5. Select all text
  6. Set it bold
  7. Bug happen again

In both cases, selection seems to change before applying.

magiksd avatar Nov 14 '18 14:11 magiksd

Hey @magiksd could you let me know what browser and version of CT your using please. I'm not able to repeat the bug in Chrome on the demo page per your instructions.

anthonyjb avatar Nov 14 '18 14:11 anthonyjb

Thank you for your quick answer. Indeed, I just tried in Chrome and the bug is not present. I encountered it in Firefox 63.0 on Ubuntu and Windows.

magiksd avatar Nov 14 '18 14:11 magiksd

OK I can repeat this in firefox - it's an odd one - once you click away and re-enter the paragraph the bug is not longer present. I'll flag this as a bug and take a look ASAP - the issue will be in ContentSelect I'm sure so will fix there and bring CT up to date.

anthonyjb avatar Nov 14 '18 14:11 anthonyjb

Thank you :)

magiksd avatar Nov 14 '18 14:11 magiksd

Hello, I just noticed that the bug only occurs when double clicking the part to select, not when selecting carefully with the mouse, maybe this will help.

magiksd avatar Nov 15 '18 16:11 magiksd

@magiksd thanks for the extra info - much appreciated :+1:

anthonyjb avatar Nov 15 '18 16:11 anthonyjb