Closed Bug 348787 Opened 18 years ago Closed 17 years ago

Double-click-drag word-by-word selection needs to be smarter about punctuation

Categories

(Core :: DOM: Selection, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 190615

People

(Reporter: aguertin+bugzilla, Unassigned)

References

Details

Bug 16203 changed double-click-drag selection to word-by-word selection, instead of character-by-character. This is nice in some cases, like when what you're selecting is in the middle of a sentence or when it's an entire sentence, but it's very annoying if you're trying to select the last few words of a sentence without the punctuation: actually, it makes it impossible. If my hazy, years-old memory serves me right, IE has an annoying thing where you can sort of wave the mouse around a bit and beg your monitor to put it into character-by-character, and sometimes it works. It's a pain, but it does let you get the selection you want. Instead of that, I propose we put a little intelligence into the selection. When the user double-clicks to select the first word, if it is a) at the beginning of a paragraph, or div, or other block-level element, or b) immediately preceded by one or more space characters which are immediately preceded by one of !.:;? then punctuation at the end of the last word of the selection should be included. Otherwise, it shouldn't. Of course, the user can still move the mouse over the punctuation to select it if they want. I suggest this because it seems to follow what the user probably wants (and what I've wanted as a user): If they're selecting an entire sentence or group of sentences, they want the punctuation involved; if they're not, they don't. Question to think about: I didn't include comma with !.:;? but should it be?
The issue you describe (not being able to select the last word without the following period) should only affect platforms where layout.word_select.stop_at_punctuation is set to false, that is, only Linux (and OS/2). Specifically, I do not suffer from it on Mac. Generally, I think most people would expect us here to follow platform conventions, rather than trying to be smart. So I think this issue is possibly valid only as an RFE for Linux, and even there, I would hesitate to do this if there's a platform convention contradicting it.
Severity: minor → enhancement
Or, this could be fixed for Linux by fixing bug 190615 (setting the pref to true by default).
Depends on: 190615
Status: NEW → RESOLVED
Closed: 17 years ago
No longer depends on: 190615
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.