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 205150 - Right click does not move the caret
Summary: Right click does not move the caret
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 148565 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-15 14:06 UTC by Miloslav Metelka
Modified: 2013-07-16 14:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2011-11-15 14:06:33 UTC
When right-clicking at certain place in document the popup menu appears but the caret stays at the original position (before the right-click). Compared (e.g. to 6.9.1) this is a regression. It's likely caused by issue #89607.
Comment 1 Svata Dedic 2011-11-15 16:44:40 UTC
I don't think the referenced changesets created the defect; I could not find a change to mousePressed/released/Clicked related to right-click or popup trigger. 

What's the desired behaviour of right-click anyway ? If we only need to position caret before popup appears, then the most straightforward fix is to add caret.setDot() inside showPopupMenuForPopupTrigger. Even the sequence will be OK, popup builder will see the caret already repositioned. 

Or should the caret be positioned on every right-click ?
Comment 2 Miloslav Metelka 2011-11-16 11:53:52 UTC
Well I've found it in some UI guidelines that right click should "Selects the object and displays its context menu" so IMHO we should add the setDot() prior popup menu invocation as you've suggested. Thanks.
Comment 3 Svata Dedic 2011-11-16 14:28:44 UTC
Changeset: ef27df809cfb
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2011-11-16 15:28
Message:   #205150: caret moves to the clicked position just before displaying the popup menu.
Issue #205150 - Right click does not move the caret: fixed
Comment 4 Quality Engineering 2011-11-17 07:29:53 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ef27df809cfb
User: Svata Dedic <sdedic@netbeans.org>
Log: #205150: caret moves to the clicked position just before displaying the popup menu.
Issue #205150 - Right click does not move the caret: fixed
Comment 5 Svata Dedic 2013-07-16 14:14:10 UTC
*** Bug 148565 has been marked as a duplicate of this bug. ***