Closed
Bug 1191469
Opened 10 years ago
Closed 5 years ago
Copying <pre> content removes newlines
Categories
(developer.mozilla.org Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: sphinx_knight, Unassigned)
Details
(Keywords: in-triage, Whiteboard: [specification][type:bug])
What did you do?
================
1. Went on https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase$edit
2. Copied and pasted code from a <pre> block (e.g. the "HTML content" code)
What happened?
==============
The pasted content doesn't have any newline. (whenever it is pasted inside the editor or in another editor (for instance, local text editor on my machine). So it seems the buffer doesn't have any newline.
What should have happened?
==========================
The content that is pasted should reflect the content that was copied.
Is there anything else we should know?
======================================
Comment 1•10 years ago
|
||
Only happens in Firefox. Really odd bug.
Comment 4•9 years ago
|
||
This wasn't happening to me until recently. Now it happens all the time and makes me crazy. Can we figure out how to fix it?
Comment 5•9 years ago
|
||
This bug was only in Firefox, but bug 1268941 reproduces at least in Safari. Also, it doesn't pass Julien's test - pasting in another text editor preserves whitespace, so this new issue appears to be pasting in CKEditor. I'm treating bug 1268941 as a separate issue. I suspect this bug should be closed.
Comment 6•9 years ago
|
||
(In reply to John Whitlock [:jwhitlock] from comment #5)
> This bug was only in Firefox, but bug 1268941 reproduces at least in Safari.
> Also, it doesn't pass Julien's test - pasting in another text editor
> preserves whitespace, so this new issue appears to be pasting in CKEditor.
> I'm treating bug 1268941 as a separate issue. I suspect this bug should be
> closed.
I think you're seeing "newlines" and translating it to "whitespace" in your head. This is just about newlines specifically.
Comment 7•9 years ago
|
||
True, I looked past the newlines report and investigated general whitespace trimming on paste. It can be done in a single editor window and a plain text editor (or even Bugzilla):
1. Edit https://developer.allizom.org/en-US/docs/user:jwhitlock
2. Copy the pre section:
Fixed width text:
* Two
* Four
* Six
* Eight
3. Paste in a plain-text editor. Whitespace is preserved.
4. Paste in visual CKEditor. Pastes on one line.
5. Switch to source mode. The text that was pasted in visual mode has no newlines, and whitespace has been combined into single spaces.
6. In source mode, paste. Output has newlines and leading whitespace.
Comment 8•9 years ago
|
||
Gah. I'm the doofus here; I zoned out on the fact that newlines are a kind of whitespace. Sorry about that. :/
Comment 9•7 years ago
|
||
Can this get traiged? At least on Android, newline is replaced by whitespace for all editors I use.
Comment 10•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•