Open Bug 565734 Opened 11 years ago Updated 4 years ago

Fix double-click selection behaviors


(Core :: DOM: Selection, defect)

Not set




(Reporter: jhill, Unassigned)


(Blocks 1 open bug)


(Whiteboard: [Advo])

(Note: this is filed as part of the “Paper Cut” bugs — we assume that there may be multiple existing bugs on this. Please make them block this bug, and we will de-dupe if they are indeed exactly the same. Thanks!)

To reproduce:
1. open a webpage with text
2. double click on a word
3. notice the highlight sometimes includes the trailing spaces

- Don't select trailing spaces when double-clicking a word
- Double-clicking between words no longer selects both words (selects space instead, useless)

- Hyphenated words are not both selected when double clicking
Component: General → Selection
Product: Firefox → Core
QA Contact: general → selection
Summary: Fix highlighting behaviors → Fix double-click selection behaviors
Double clicking selects also the comma and other punctuation marks.
I think that our double-clicking behavior tries to imitate platform conventions.  On Mac, it doesn't select the trailing space.  On Windows and Linux it does.

This behavior can also be controlled by the layout.word_select.eat_space_to_next_word pref.
To add to what Ehsan mentioned, the behavior Ria referred to is controlled by layout.word_select.stop_at_punctuation which is true by default on Windows (which is why I never noticed it before).  Playing around a bit just now, though, it seems that when it is set to false, it ignores the eat_space pref when punctuation is present.

I much prefer eat_space set to false and stop_at_punc set to true.
Respecting platform settings sounds perfectly good to me.

I find it annoying when 'software thinks it knows to do things better' than what is common on a certain system. Even if it is subtle little things, it leaves the feeling that something happened differently than it should have. 
I just think it's important to have a consistent behaviour and outlook of the programs (the reason why I don't like Personas and Themes) to use them efficiently.

I have to admit that this is a general "respect system settings"-rant. ;)
Duplicate of this bug: 699027
Whiteboard: [Advo]
So is this WONTFIX, i. e. do you want to keep platform specific behaviour? Did Windows 8 change anything in that regard? 

Or do you want to align all platforms, ignoring platform specific behaviour? (Then I'd vote for Mac's default behaviour because it is the more sensible. That's also what is requested in Comment 0.)

(Oh, and Comment 1 is not how it works on my Mac, currently. This one may be worth considering.)
I've tested out a lot of szenarios under Windows (7/8.1) with some strage results:
Ms Word: includes whitspaces
Notepad: includes whitspaces, dots and whitespaces after dots
Dreamviewer / Notepad++: ignores dots and whitespaces

So Windows 8.1 doesn't change anything. But I propose to ignore whitespaces on selections in page source by default on every platform.
Under Linux, whitespace is not included in general (which is fine), but sometimes it is included. For instance, in the title of this bug, if I double-click on the first word "Fix", I get " Fix", and if I double-click on the last word "behaviors", I get "behaviors ". A whitespace should never be included.

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