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
- Open editor and clear it's content.
- Type some text:
abcdefg
- Put caret here:
ab^cdefg
- Select font size: 72
- Put caret somewhere else:
abcd^efg
- 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
comment:2 Changed 10 years ago by
Status: | new → confirmed |
---|---|
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.
cc