Double-clicking a word does not select it #1

Closed
opened 2011-01-19 11:52:18 +01:00 by marijnh · 14 comments
marijnh commented 2011-01-19 11:52:18 +01:00 (Migrated from gitlab.com)
No description provided.
marijnh commented 2011-01-19 12:21:53 +01:00 (Migrated from gitlab.com)

It does on Webkit, Opera, and Firefox. Since you didn't even specify which browser you tested with, I'm going to close this until further notice.

It does on Webkit, Opera, and Firefox. Since you didn't even specify which browser you tested with, I'm going to close this until further notice.
marijnh commented 2011-01-19 12:26:51 +01:00 (Migrated from gitlab.com)

It doesn't in all tested browsers (Safari 5.0.3, Opera 11 and Firefox 4 beta 10 pre on Mac OS X 10.6).

It doesn't in all tested browsers (Safari 5.0.3, Opera 11 and Firefox 4 beta 10 pre on Mac OS X 10.6).
marijnh commented 2011-01-19 12:34:21 +01:00 (Migrated from gitlab.com)

Well, it does for me. Please describe your test case in more detail. When I visit http://codemirror.net/jstest.html and double-click any of the words in the editor, they are selected.

Well, it does for me. Please describe your test case in more detail. When I visit http://codemirror.net/jstest.html and double-click any of the words in the editor, they are selected.
marijnh commented 2011-01-19 12:39:46 +01:00 (Migrated from gitlab.com)

I'm talking about CodeMirror 2. This is why I created an issue here. Text selection in CodeMirror 0.92 works well for me.

I'm talking about [CodeMirror 2](http://codemirror.net/2/). This is why I created an issue here. Text selection in CodeMirror 0.92 works well for me.
marijnh commented 2011-01-19 12:41:19 +01:00 (Migrated from gitlab.com)

Ugh, I didn't pay attention. Yeah, double-click select is definitely broken in CM2. Adding to my list.

Ugh, I didn't pay attention. Yeah, double-click select is definitely broken in CM2. Adding to my list.
marijnh commented 2011-02-04 23:12:37 +01:00 (Migrated from gitlab.com)

This was implemented in 0995478327

This was implemented in 09954783272d371059874a63c0663bbc6f84bf8f
marijnh commented 2011-02-22 13:13:09 +01:00 (Migrated from gitlab.com)

Still doesn't work correctly, sometimes it does select the word, other times it selects the first line or jumps to the beginning of the first line. (Edit: It seems this happens when double clicking between the characters. Weird.)

I debugged the code and it seems it sometimes fires the double click event (and works correctly) and sometimes it doesn't. I think the event is going to the wrong element.

Still doesn't work correctly, sometimes it does select the word, other times it selects the first line or jumps to the beginning of the first line. (Edit: It seems this happens when double clicking _between_ the characters. Weird.) I debugged the code and it seems it sometimes fires the double click event (and works correctly) and sometimes it doesn't. I think the event is going to the wrong element.
marijnh commented 2011-02-22 15:16:03 +01:00 (Migrated from gitlab.com)

Heh, this was a bizarre corner case where the mouse event ended up on the absolutely positioned cursor node, and my code, which tried to ensure it only handled events on the text (not, for example, on the line-number gutter), got confused by that. Should be fixed by 3153be8ffc , let me know if you find more problems.

Heh, this was a bizarre corner case where the mouse event ended up on the absolutely positioned cursor node, and my code, which tried to ensure it only handled events on the text (not, for example, on the line-number gutter), got confused by that. Should be fixed by 3153be8ffceecf1298b9a6deb6559648b8d1db5a , let me know if you find more problems.
marijnh commented 2013-01-14 18:21:45 +01:00 (Migrated from gitlab.com)

mentioned in issue #1157

mentioned in issue #1157
marijnh commented 2014-08-06 19:19:12 +02:00 (Migrated from gitlab.com)

mentioned in merge request !9909

mentioned in merge request !9909
marijnh commented 2016-04-29 20:06:33 +02:00 (Migrated from gitlab.com)

mentioned in issue #3537

mentioned in issue #3537
marijnh commented 2017-11-28 00:08:48 +01:00 (Migrated from gitlab.com)

mentioned in issue #4604

mentioned in issue #4604
marijnh commented 2018-02-08 17:41:03 +01:00 (Migrated from gitlab.com)

mentioned in issue #5251

mentioned in issue #5251
marijnh commented 2019-03-31 01:11:41 +01:00 (Migrated from gitlab.com)

mentioned in issue #5840

mentioned in issue #5840
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5#1
No description provided.