Opened 16 years ago

Closed 7 years ago

#2015 closed Bug (duplicate)

Double clicking a word selects the following space as well

Reported by: Ian Danforth Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:


Double clicking a word to select it should select only the word, not the space which follows it.

Change History (8)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed added
Version: FCKeditor 2.6 Beta

Confirmed. This bug appears in IE and FF2 as well. Tested using 2.6 beta and the latest SVN

comment:2 Changed 16 years ago by Martin Kou

This seems to be a convention of how selections in Windows work, and it's not just limited to browsers. Say, if you open Microsoft Word 2003 or Notepad in Windows XP and type a sentence in it, and then double click on a word, it would select the space following the word as well. Safari and Opera for Windows, however, wouldn't do it, but then you can argue it's them that's buggy.

This seems to be a case where if the bug is "fixed" then more people would complain why it isn't selecting the space, as selecting the space is actually something most people are used to seeing. So I'm voting for a wontfix for this ticket.

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

I agree, that's a behavior controlled by the browser and I don't think that we should mess with it.

The only thing that I would change would be that if some command is executed on that text, it might be better (in the cases that I have in mind) to apply the command to the selection, but excluding that last space: If I select 'is' it does add the space after it, and clicking bold it generates <b>is </b>, but it might be slightly better to generate <b>is</b>

The difference is very small, and I don't know if it might be the expected behavior in all the cases, and if the complexity of the added code is worth the effort.

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

I think we'll not be able to work on fixing the selection in this case. The code for it would not be just a couple of lines, and the DOM will definitely suffer with it. After all, it is something that users are just used to, even if annoying.

I've just found this little configuration pearl for Firefox: layout.word_select.eat_space_to_next_word. So, FF users may have an option, even if hidden inside the about:config stuff. A FF extension, like WriteArea could benefit of it too.

Handling the styles in the way Alfonso proposes instead, is something that makes some sense, but may give also troubles. After all, we'll hear: "I want the background to be applied to the selected space". So, while is normal to have the entire selection styled, it is abnormal to do that just in a piece of it. The real problem is the selection system, not the style system.

This ticket is taking the shape of a wontfix, but I'll still leave it flying around, just in case someone has further to say about it.

comment:5 Changed 16 years ago by michaeloperafox

It might be safe to say that the most common way of creating one-word-links in FCKEditor is double-clicking the word and then pressing the "create-link-button" .

These links are now created with an extra space underlined at the end . This is neihter pretty , nor is it correct regarding semantics or logic . A lot of people , including myself will ask themselves "An underlined space at the end ? Why ?" . Technology should make things easier and better , not just easier . Imagine , for instance , that there was a space before every period , comma and questionmark . Not that pretty , is it ?

Main problem might be that it makes a lot of pages in a content management system ugly . I think it is a problem if site owners with design knowledge will consider other editors that won't create ugly links . Otherwise I don't think it matters . I can always make this extra space go away with some php-magic , but I would consider fixing this for the good of the majority .

comment:6 Changed 16 years ago by michaeloperafox

Even if double-clicking a word in Microsoft Word selects the space after it, inserting a hyperlink on it will not underline that extra space.

Hmmm, there is more to this than aesthetics. Consider making a link out of one word and another link out of the following. There is no way telling that these are two separate links until you mouseover them. Probably should be fixed.

comment:7 Changed 13 years ago by Frederico Caldeira Knabben

Version: FCKeditor 2.6 Beta3.0

#6139 has been marked as DUP.

comment:8 Changed 7 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

There is nothing we can do about selection but as pointed out, we could trim the space so that links look/work better.

I think this issue is better addressed by #8690 thus I will close it as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy