Opened 11 years ago

Last modified 9 years ago

#12634 confirmed Bug

Impossible to place caret in empty inline style that existed in an empty block — at Version 1

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 3.0
Keywords: IBM Cc: satya_minnekanti@…

Description (last modified by Piotrek Koszuliński)

  1. Open any sample.
  2. Clean the contents.
  3. Press the bold button and type something.
  4. Press enter multiple times. Notice that the bold style is preserved.
  5. Start pressing up arrow or clicking in the empty paragraphs.
  6. Notice that bold is gone.
  7. Check the DOM - strong elements are still there.

There are two solutions possible:

  1. Put bogus <br> inside empty inline elements. Then, I think that browsers will place the caret inside empty blocks by themselves.
  2. Handle this on keyup and mouseup events. Check whether collapsed selection was placed next to empty inline element in an empty line and fix the selection.

BTW. Note that pressing the bold button again after navigating to the empty line will create another strong tag. This is due to #12633.

Change History (1)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Description: modified (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy