Last Comment Bug 1270919 - Cut and paste from some HTML adds an extra leading space to a word selection
: Cut and paste from some HTML adds an extra leading space to a word selection
Status: RESOLVED DUPLICATE of bug 303597
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
data:text/html,word1 word2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-06 11:12 PDT by Chris Siebenmann
Modified: 2016-05-09 04:44 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
affected


Attachments

Description Chris Siebenmann 2016-05-06 11:12:21 PDT
Under some circumstances, Firefox's cut and paste will add an extra
leading space (or tab) to your selection of a word. The minimal HTML
needed to reproduce this is:

<html> <body>
<div>word1
  word2</div>
</body> </html>

(Note that 'word2' is indented here, and that's important.)

If you double-click to select word2 and only word2, then copy and paste
it, the pasted text will have an extra leading space. In other words,
you get ' word2' pasted. Any number of leading spaces in the HTML source
will be turned into one space, but if you indent word2 with a tab, the
paste result has the tab present.

This reproduces with current Firefox release versions and Firefox trunk
on Linux, Windows, and OS X. The issue's been present in Firefox for
several years now, although it didn't used to be there.

It's possible that this is related to #303597.
Comment 1 Daniel Brooks [:db48x] 2016-05-06 22:23:05 PDT
Minimal testcase: data:text/html,word1  word2
Comment 2 :Gijs Kruitbosch (Gone July 28 - Aug 11) 2016-05-09 04:44:30 PDT

*** This bug has been marked as a duplicate of bug 303597 ***

Note You need to log in before you can comment on or make changes to this bug.