Opened 9 years ago
Last modified 8 years ago
#14391 review Bug
[Blink, FF] Alignment/Indentation/Language direction lost when we copy & paste
Reported by: | Satya Minnekanti | Owned by: | kkrzton |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IBM | Cc: | chrisgui, Irina |
Description
Steps to reproduce
- Open nightly build
- Type few paragraphs & apply different Alignments(left, center, right, justify)
- Select a paragraph with alignment(ex: right), copy it and paste it.
Expected result
Paragraph pasted properly with correct alignment
Actual result
Paragraph pasted with out any alignment.
- Type few paragraphs & apply different Indentaions to them
- Select a paragraph with Indentation(ex: margin-left:40px;), copy and paste it.
Expected result
Paragraph pasted properly with correct indentation
Actual result
Paragraph pasted with out any indentation.
This is happening across all browsers
Change History (13)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Summary: | Alignment/Indentation lost when we copy & paste → Alignment/Indentation/Language direction lost when we copy & paste |
---|
Replying to satya:
Steps to reproduce
- Open nightly build
- Type few paragraphs & apply different Alignments(left, center, right, justify)
- Select a paragraph with alignment(ex: right), copy it and paste it.
Expected result
Paragraph pasted properly with correct alignment
Actual result
Paragraph pasted with out any alignment.
- Type few paragraphs & apply different Indentaions to them
- Select a paragraph with Indentation(ex: margin-left:40px;), copy and paste it.
Expected result
Paragraph pasted properly with correct indentation
Actual result
Paragraph pasted with out any indentation.
- Type few paragraphs & apply different language direction (ex: dir=rtl) to them
- Select a paragraph with RTL Language direction copy and paste it.
Expected result
Paragraph pasted properly with correct language direction
Actual result
Paragraph pasted with out any language direction.
This is happening across all browsers
comment:3 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Version: | 4.5.7 |
Results:
- Select text with a mouse, copy/paste into same paragraph works.
- Select text with a mouse, copy, move cursor to the end of left-aligned paragraph, press enter and paste. There is an issue as paragraph is now left-aligned.
- Select paragraph using element's path, copy, move cursor to the end of left-aligned paragraph, press enter and paste. Paragraph is right-aligned.
- Select text with a mouse, copy, move cursor to the end of right-aligned paragraph, press enter and paste. Paragraph is right-aligned.
It seems when selecting paragraph with a mouse, only contents are copied or element styles are missed. It also seems it has always worked that way.
After discussing this ticket with m.lewandowski we have decided to close this ticket as duplicate - #14358. Let's continue this topic there.
comment:4 Changed 9 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
After more analysis I'll reopen this issue, as our paragraph copy handling has some custom logic in there. That makes it different from standard blocks, like headers.
comment:5 Changed 9 years ago by
Status: | reopened → confirmed |
---|
comment:6 Changed 9 years ago by
Owner: | set to kkrzton |
---|---|
Status: | confirmed → assigned |
comment:7 Changed 9 years ago by
Copying text with set direction (rtl, ltr) does not work only on IE (due to no custom copy/cut handling #14358#comment:8), works on Chrome and FF. Direction is applied to inline span inside paragraph so it is a matter of copying inline elements.
Other styles (alignment, indentation) copying does not work across all browsers as mentioned in description (because are applied to block element and are not copied).
comment:8 Changed 9 years ago by
I assume it should work consistently with copy/paste of other elements. So when pasting previously copied block elements (paragraphs, divs):
- When pasted in new/empty line all block styles are preserved.
- When pasted inside existing text, copied block styles are removed so pasted text fits in the paragraph in which it was pasted (that's how it works now for other elements).
- When more than one block element is pasted (e.g. two paragraphs were copied), all block styles are always preserved even when pasting inside existing text. It means it will split existing paragraph into which it was pasted.
comment:9 Changed 9 years ago by
Summary: | Alignment/Indentation/Language direction lost when we copy & paste → [Blink, FF] Alignment/Indentation/Language direction lost when we copy & paste |
---|
Due to same reasons as here #14358#comment:8, so basically no custom copy handling in IE, it will be better to also split this task to IE and non-IE browsers so it can be proceed separately.
IE issue #14406.
comment:12 Changed 8 years ago by
comment:13 Changed 8 years ago by
NOTE: From what I have checked this particular issue can be reproduced from CKEditor 4.2.0. Copying from earlier editors even into newer versions preserved the alignment.
Same issue happening with Language direction(dir)applied to paragraph