bevacqua/woofmark

Selecting a bit of text and then pressing bold, italic, bold, ruins the selection.

szm1 opened this issue · 0 comments

szm1 commented

Type the following into a fresh instance of the editor in chrome:

This is a test line.

Then, using the keyboard or mouse, select the entire line. Press the bold button, followed by the italic button, and then the bold button again.

The resulting selection will now be:

This is a t

and subsequent presses of the bold and italic buttons do odd things (either causing the selection to reduce in size again, disappear, or do absolutely nothing).

I would expect the text selection to remain the same regardless of how many times the bold and or italic buttons are pressed in this situation. The same thing happens if the shortcut keys for bold and italic are used.

Depending on which browser is used, depends on how much of the text selection is changed. I have tested this on both the demo site (https://bevacqua.github.io/woofmark/), and a version I downloaded from npm (version 4.2.3).

Running on chrome:
woofmarkbolditalic