Open Bug 1298706 Opened 8 years ago Updated 2 years ago

Copied text (that is enclosed in <kbd></kbd> tag in HTML) via doubleclicking has leading whitespace in this site

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: rick3162, Unassigned)

References

()

Details

When copying any username or password text in http://bugmenot.com/, it contains leading spaces, e.g. if the username text is 'abc' then the copied text is: ' abcd' (4 leading spaces). Examining the HTML code in inspector reveals that there's no whitespace in there: (I added newlines for clarity) <dt>Username:</dt> <dd><kbd>abc</kbd></dd> <dt>Password:</dt> <dd><kbd>abc</kbd></dd> STR (using either FF 48 x64 or Nightly 51): - click this google search link and then open any of the 6 displayed results: https://www.google.com/#q=bugmenot (I'd prefer avoid posting direct bugmenot links) - doubleclick on any 'Username' or 'Password' text and press Ctrl+C (or rightclick|Copy) - paste the copied text e.g. in awesomebar: you'll notice the leading whitespace If you remove the <kbd> tag (or change it into something else (e.g. <dd>, <dl> or <pre>) then the issue doesn't occur. In all other browsers I tested (Chrome 52, Edge 11, IE 11) the issue doesn't occur.
Issue present in old versions of FF.
Summary: Copied text (that is enclosed in <kbd> in HTML) via doubleclicking has leading whitespace tags in this site → Copied text (that is enclosed in <kbd></kbd> tag in HTML) via doubleclicking has leading whitespace in this site
Component: General → Selection
Product: Firefox → Core
See Also: → 303597
Not only via doubleclicking. Any copying (via mouse selection) leads to this bug.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.