This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 89607 - Implement Double-click-drag-select and Triple-click-drag-select
Summary: Implement Double-click-drag-select and Triple-click-drag-select
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 15 votes (vote)
Assignee: Miloslav Metelka
Keywords: PLAN
: 114518 154505 197390 (view as bug list)
Depends on:
Reported: 2006-11-19 13:55 UTC by liyanage
Modified: 2011-10-11 15:37 UTC (History)
8 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description liyanage 2006-11-19 13:55:09 UTC
Double-click-drag selection doesn’t work as expected. With double-click-drag selection I mean 
double-clicking a word and keeping the mouse button pressed on the second click. In every other Mac 
OS X text editing environment, this selects the entire double-clicked word and then allows me to drag-
extend the selection in increments of entire words instead of character-by-character. In NetBeans, the 
double-click is ignored, it behaves like a regular single-click selection. The regular behavior is 
especially useful since I have mapped the middle mouse button (wheel button) to a double-click.

Triple-click-drag selection has the same problem, it doesn’t work as expected. In other text views, 
triple-clicking text selects the entire line or paragraph. Dragging up or down selects more lines. It’s a 
very convenient feature. In NetBeans, triple-clicking selects the word under the cursor and then starts a 
drag for the word.

It would be great if this were consistent with other OS X text editing views. I don’t know how this 
behaves on other platforms, but if their user interface guidelines don’t explicitly specify different 
behavior, then this could even be useful on all platforms.
Comment 1 Jiri Prox 2007-09-04 15:04:15 UTC
*** Issue 114518 has been marked as a duplicate of this issue. ***
Comment 2 peastman 2008-06-18 21:58:53 UTC
This is not just a Mac issue.  Multi-click-drag behavior has been completely standard in nearly all text editors for 20
years.  Try it in just about any editor on any platform, from Eclipse to Notepad to MS Word.  They all support it.  The
behavior in Netbeans is simply broken.
Comment 3 Jiri Prox 2008-06-19 09:29:21 UTC
The double and tripe click works as in other java applications.
the problem is better described in issue 114518 - the double click means push&release button twice not just
Unfortunately this is standard java behavior. maybe we can change it somehow in the editor to the shorter case, which is
IMO more common. 

Comment 4 myk 2009-08-27 18:58:36 UTC
jiriprox: I'm not sure I understand your comment.  The workflow here is push-release-push-drag to select multiple words.
 This issue is not about push-release-push-release as you stated in your comment.
Comment 5 ivan 2009-08-27 21:24:39 UTC
*** Issue 15205 has been marked as a duplicate of this issue. ***
Comment 6 ivan 2009-08-27 21:29:19 UTC
It's like to reassert that this is not just a Mac issue.
Re "this is standard java behaviour". I don't buy it.
I can point out many many things that Java has gotten wrong ...
why should we suffer and have out productivity suffer as a result?

Comment 7 myk 2009-08-28 21:40:49 UTC
No other Java application suffers from this bug as far as I can tell.  I just word-selected text in a vuze (the java
bittorent client) without trouble, for example, and that's not even a text editing application!  This inability to
word-select text in netbeans has annoyed me since I started using netbeans 5.0.  (I'm on Gentoo Linux, by the way, so,
no, this is not just a mac bug)
Comment 8 myk 2009-08-28 22:06:11 UTC
An interesting data point regarding this issue:

NetBeans itself has different behavior for the click-release-click-drag action depending on where you do it.  In the
source code editor, it has the annoying behavior of not selecting the current word on the second click, hence treating
click-release-click-drag the same as click-drag.

However, in the NetBeans Help->About window (or any other text area, such as the build output), the behavior is
different.  If you click-release-click-drag on the words in the text box, the behavior is *almost* correct.  The current
word is properly selected on the second mouse button press, and subsequent drag-selecting by holding the mouse button
down works.  There are still two missing behaviors, though.
1) When drag-selecting, the selection doesn't jump to word boundaries.  It still behaves the same as single-press-drag.
2) If you drag select to the left, the original word that was selected becomes deselected.

Expected behavior is what firefox, for example, does.  Single-press-drag selects character by character. 
Double-press-drag selects word by word, stopping at spaces and punctuation, always keeping the original word that was
double-clicked selected no matter if the cursor is dragged to the left or the right.
Comment 9 ivan 2009-08-28 23:06:10 UTC
Re firefox: must be a somewhat new addition.

Also this isn't just about the editor. 
Regular output window has the "undesired" behaviour (terminalemulator has the "desired" behaviour).
Comment 10 Vitezslav Stejskal 2009-08-31 11:01:04 UTC
*** Issue 154505 has been marked as a duplicate of this issue. ***
Comment 11 geniosity 2009-10-27 17:38:41 UTC
Target Milestone of 6.8 but no updates on this. 

Does anybody know if it's fixed? Currently this is the only defect it NetBeans that actually REALLLLLLY bothers me.
Comment 12 Vitezslav Stejskal 2009-10-29 11:18:01 UTC
No, it's not fixed, I am afraid. It will be, once it's status is set to FIXED.
Comment 13 geniosity 2009-10-29 11:23:28 UTC
I figured it would be set to "FIXED" but I was hopeful that one of the other "feature requests" for this would somehow
have been snuck in.

Good luck fixing it. I wish I could do it because I know it bugs EVERYBODY on my team.
Comment 14 BuddhaBandit 2010-03-25 18:10:27 UTC
Please fix this ASAP.  It's terribly annoying.  I'm perplexed that we're all the way to version 6.8 of NetBeans and this is still here.  This (double-click-drag-to-select-whole-words) is such standard behavior in all GUI text editors.  It's not just a nice to have, it just makes one LESS PRODUCTIVE.  It stops you in your tracks.  PLEASE FIX!!  Thank you.
Comment 15 BuddhaBandit 2010-03-25 18:12:39 UTC
and of course, when I said "it just makes one LESS PRODUCTIVE. It stops you in your tracks.", I meant the bug, not the fix.  I munged the fix with the problem in once sentence by accident.
Comment 16 citium 2010-03-31 19:36:06 UTC
Same Problem in window.

I reported a similar one to this a while ago.
And netbean said it my os fault.

I can live with the memory leak, but not this.
Never considering netbean again.
Comment 17 silverownz 2010-03-31 19:45:00 UTC
what will it take to get this fixed??? By far the most annoying bug in netbeans...and yet it's been around since the beginning. Such a basic, must-have feature that is missing.
Comment 18 dougp316 2010-04-23 15:30:41 UTC
+1 very frustrating *bug*, hasn't this even been acknowledged?
Comment 19 bodawei 2010-06-28 17:03:29 UTC
I agree with what others say. This is a surprising limitation of the NetBeans editor.  It is one of those small, but crucial, things that will drive some newcomers away from the platform.  This ought to have a really high priority, not a mere P3.

Based on the comments, it seems that some folks have different ideas about what is being described.  I'll add my own explanation here:
In most text editors (plus browsers, etc etc), the following gesture:
   1) press-mouse-button
   2) release mouse button
   3) press-mouse-button
   4) drag mouse
   5) release-mouse-button

during the mouse drag, the selection will be expanded/reduced by one whole word at a time.  This is similar to the press, release, press, release gesture to select a whole word, but instead of the last release, one drags the mouse to select whole words.  (or, similar to the press-mouse-button, then drag mouse to select by letters).
Comment 20 silverownz 2010-06-28 17:09:28 UTC
why has this not been fixed for nearly 4 years??
Comment 21 matt.connolly 2010-07-13 23:21:13 UTC
+1 please fix this. This bug annoys me every minute or so. I'm just about to give up and go back to Eclipse just because of this annoying behaviour.

Still occurs in Netbeans 6.9. AARGH!
Comment 22 geniosity 2010-07-14 09:41:11 UTC
I guess this is one of those that don't bother the lead developers enough to warrant looking at it.

I wish I didn't like NetBeans so much that I could change to Eclipse.
Comment 23 David Strupl 2010-07-22 15:01:56 UTC
I will add this to the plan here
Comment 24 geniosity 2010-07-22 16:02:36 UTC
(In reply to comment #23)
> I will add this to the plan here 

I'm pretty sure there are going to be LOTS of people complaining about this being a defect and not a feature request, but hey, after 4 years I guess I'll take what I can get.
Comment 25 ivan 2010-07-22 19:59:11 UTC
> I'm pretty sure there are going to be LOTS of people complaining about this
> ... but hey, after 4 years ...

4 years? That's nothing.
I've been waiting since 2001 (see bug #15205)
Comment 26 silverownz 2010-07-22 23:20:26 UTC
millions shall rejoice the day 6.10 is released.
Comment 27 SteveTheRed 2010-10-07 20:44:39 UTC
I just switched from eclipse to NetBeans 6.8. I have the same problem as the others. I love everything about Netbeans so far except for this truly annoying and productivity-reducing bug. Thanks.
Comment 28 David Strupl 2010-10-07 20:55:47 UTC
You are welcome but please don't change the attributes of already evaluated reports. Thanks for your understanding. Oh and by the way as with other open source projects any report with a patch attached is a way more likely to be integrated that ones without one, we are all developers, right?
Comment 29 bodawei 2011-02-21 01:14:14 UTC
Can anyone confirm if this is being worked on for 7.0?  I note the problem is still there in 7.0 beta 2.
Comment 30 fdisk 2011-04-04 17:24:39 UTC
Product Version: NetBeans IDE 6.9 (Build 100825-unknown-revn)
Java: 1.6.0_20; OpenJDK Client VM 19.0-b09
System: Linux version 2.6.35-28-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/fdisk/.netbeans/6.9

The problem still here
Comment 31 bodawei 2011-04-05 03:35:32 UTC
Is this something that someone on the NB team can give some suggestions of where to look and what to do?  I don't have lots of spare time, but this also makes it so painful for me to use NB that I frequently think of switching to that other IDE.  so, if this isn't going to be addressed for 7.0 by someone on the main team, I'd be happy to look and see if I can do anything.  (given that this is a text thing, that's probably naive of me.  but, I'll try anyway)
Comment 32 Miloslav Metelka 2011-08-16 09:03:35 UTC
Comment 33 geniosity 2011-08-16 09:10:01 UTC
if you've seriously fixed this bug, send me your details and I'll buy you a drink!!!!
Comment 34 Miloslav Metelka 2011-08-16 11:48:59 UTC
:-) Thanks, but I'm located in Prague in Czech Republic ;)

I'll be happy (once the fix proceeds into Dev builds) if people on cc list could test whether the feature works as desired on all platforms. And also an existing caret's functionality should be checked (since the feature required considerable changes in the BaseCaret's code).

 In particular I've tested on Ubuntu 11.04:
1) Regular single-press character selection.
2) Double-press word selection - it tries to be inclusive so once the caret "enters" the word at least partially the word is added to the selection.
3) Triple-press line selection - inclusive similarly to word selection (line added when caret gets located over it).
4) Selected text dragging (existing feature).
5) Click with Shift key should extend/shrink selection to that point (existing feature).
6) Popup menu invocation on right-click.
7) When hovering the (pressed) mouse above document's top (mouse y relative to component was < 0) the selection did not automatically include first line - it was sensitive to x coordinate (x <= 0 was necessary to fully include first line). Now y < 0 ensures that the first line will be fully selected.
Comment 35 bodawei 2011-08-16 14:09:50 UTC
So, can we at least send you money for a drink?  What address should it go to?

Will be happy (thrilled. overjoyed. ecstatic) to test this out once it is ready!
Comment 36 geniosity 2011-08-16 14:20:57 UTC
I totally agree. Give your PayPal address and I'll "buy you a beer" via that...
Comment 37 liyanage 2011-08-16 16:13:42 UTC
I expected this bug to reach its 10-year anniversary :-)
Comment 38 Miloslav Metelka 2011-08-17 12:13:27 UTC
Additional fix was necessary for proper focus traversal:
Comment 39 Quality Engineering 2011-08-17 13:53:12 UTC
Integrated into 'main-golden'
User: Miloslav Metelka <>
Log: #89607 - Implement Double-click-drag-select and Triple-click-drag-select.
Comment 40 Quality Engineering 2011-08-18 13:50:04 UTC
Integrated into 'main-golden'
User: Miloslav Metelka <>
Log: #89607 - Implement Double-click-drag-select and Triple-click-drag-select - fixed focus traversal.
Comment 41 geniosity 2011-08-19 12:55:33 UTC


This was LITERALLY the only reason I've downloaded Eclipse THREE TIMES to try and use it instead. (Of course, once you're used to something, it's hard to try use something else)
Comment 42 bodawei 2011-08-19 14:05:45 UTC
This works perfectly!  HURRAY!!  I'm very happy!
Comment 43 Miloslav Metelka 2011-10-11 15:37:14 UTC
*** Bug 197390 has been marked as a duplicate of this bug. ***