Selecting text by double-clicking includes leading whitespace characters if there's more than 2 whitespaces separated by tags

UNCONFIRMED
Unassigned

Status

()

Core
Selection
UNCONFIRMED
8 years ago
3 years ago

People

(Reporter: Axel, Unassigned)

Tracking

Trunk
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [dupeme])

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12


It's impossible to copy information like bank account data from a HTML based e-mail into an online banking form. Firefox always includes leading whitespace when double-clicking a word, e.g. a bank account number. The leading whitespace keeps the content from fitting HTML <input> elements having the "maxlength" attribute set, expecting nothing but the data to be input.


Reproducible: Always

Steps to Reproduce:
1. create some HTML file containing below markup and open the file in Firefox,
2. double-click one of the numbers,
3. copy the selected text,
4. paste from the clipboard to some text editor and examine the result.


Here's the sample data (fakes):

<br>Account number        201234605<br>Institute number       70012310<br>

Actual Results:  
       201234605

Expected Results:  
201234605
(Reporter)

Updated

8 years ago
Summary: Copying text by double-clicking includes leading whitespace characters → Selecting text by double-clicking includes leading whitespace characters

Comment 1

8 years ago
Works for me
Mozilla/5.0 (Windows; U; Windows NT 6.1; ja; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ID:20110303024726
(Reporter)

Comment 2

8 years ago
Yes, you are right.

This only seems to happen with text copied from Hotmail or EBay. There must be something in their markup that's causing Firefox to show this behaviour.

Unfortunately I can't tell what is the particular cause for this issue to occur.

Updated

7 years ago
Version: unspecified → 3.6 Branch

Comment 3

3 years ago
If I write like that:

<b>Username:</b>
<a href="mail@yandex.ru">mail@yandex.ru</a>

...I will have text with space between them. And double clicking on mail address will select also the whitespace.
Writing like that:

<b>Username: </b><a href="mail@yandex.ru">mail@yandex.ru</a>

.. is Ok.(In second example I put whitespace after colon)

Firefox 38.0 (Ubuntu)
PS. If someone want to test - tell me your mail - I will send you mail in html form.

Comment 4

3 years ago
>>>   My Info:   Win7_64, Nightly 46, 32bit, ID 20160107030235
STR:
1. On the following pages, doubleclick string "9001"
 A) data:text/html,<b>Testing level &nbsp;</b> &nbsp; &nbsp; <a> 9001 (over nine thousand)</a>
 B) data:text/html,<b>Testing level: &nbsp;</b> &nbsp; &nbsp; <a> 9001 (over nine thousand)</a>

Results:
 A) Selected text:   "level         9001 "
 B) Selected text:   "       9001 "

Expectations:
 A), B) Selected text should be "9001 "  (i.e. eat spaces to the right, at least on Windows)

Notes:
 Removing "&nbsp;"s also exposes the issue. Also, there may be other examples of this bug.
Status: UNCONFIRMED → NEW
Component: General → Selection
Ever confirmed: true
Product: Firefox → Core
Summary: Selecting text by double-clicking includes leading whitespace characters → Selecting text by double-clicking includes leading whitespace characters if there's more than 2 whitespaces separated by tags
Whiteboard: [dupeme]
Version: 3.6 Branch → Trunk

Comment 5

3 years ago
Seems duplication of Bug 1232322

Comment 6

3 years ago
Thanks. This on (639579) is definitely older than bug 853361 that caused the issue in comment 4.
It's unclear how to deal with this bug since it's so old and has no valid STR
Status: NEW → UNCONFIRMED
Ever confirmed: false
You need to log in before you can comment on or make changes to this bug.