Opened 10 years ago

Last modified 10 years ago

#12689 confirmed Bug

Empty inline element should be removed when selection leaves it.

Reported by: Artur Delura Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

Example use case

  1. Open editor and clear it's content.
  2. Type some text: abcdefg
  3. Put caret here: ab^cdefg
  4. Select font size: 72
  5. Put caret somewhere else: abcd^efg
  6. Select font size: 24

As you can see cursor fit 72 but we don't have any 72 text. That's because empty span hasn't been removed.

Since it's affect only visual part of editor (empty elements are removed on save). We might consider using CSS3 :empty pseudo selector:

span:empty {
  display: none;
}

But it's more workaround rather sultion, and it's not fully supported by browsers and it's not bulletproof.

Change History (2)

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

cc

comment:2 Changed 10 years ago by Jakub Ś

Status: newconfirmed
Version: 4.0

This issue is related to #12684.

We should remove empty inline elements in non-empty lines while we could/should leave empty inline elements in empty lines.

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