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.
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.
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 ?
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.
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
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
*** Bug 148565 has been marked as a duplicate of this bug. ***