Open Bug 1239453 Opened 9 years ago Updated 4 years ago

Multiple spaces become single space when copy from page

Categories

(Core :: DOM: Serializers, defect, P5)

43 Branch
defect

Tracking

()

People

(Reporter: scow, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 Iceweasel/43.0.2 Build ID: 20151228074541 Steps to reproduce: reproduce: for example, on the web: https://git.gnome.org/browse/file-roller/diff/src/dlg-package-installer.c?id=4b64c5ece7a4e209799b72845b1587d4b9323940 I copy the text "-package_installer_terminated (InstallerData *idata," (right button -> copy) between "InstallerData" and "*idata" they are three spaces I paste in a text editor (pluma) Actual results: on the text editor, right click -> paste I see -package_installer_terminated (InstallerData *idata, only paste one space Expected results: must be paste the three spaces: -package_installer_terminated (InstallerData *idata,
white-space: pre; in table.diff td {} seems works for display only, it seems to be "pre-line" when copying.
Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Summary: copy -> paste text in web , various spaces (char ' ') dont copy succesfull → Multiple spaces become single space when copy from page
This works correctly if I highlight at least two lines. So seems like an issue only with selections that don't include the actual node the style is on or something like that. Simple testcase: data:text/html,<div style="white-space: pre">Some text</div> and highlighting from 'm' to 'x'. Note that if I replace the "div" with a "span" the problem disappears. This has nothing to do with CSS parsing; this is all text serializer stuff. Ehsan, do we even have a place where this should live, other than "DOM"?
Component: CSS Parsing and Computation → DOM
Flags: needinfo?(ehsan)
Component: DOM → Serializers
Flags: needinfo?(ehsan)

Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.