[
https://issues.apache.org/jira/browse/NETBEANS-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16375682#comment-16375682
]
Eirik Bakke edited comment on NETBEANS-403 at 2/24/18 5:10 PM:
---------------------------------------------------------------
Doing a bit of research on this, the problem seems to be that
javax.swing.text.DefaultEditorKit$EndAction.actionPerformed is called instead
of org.netbeans.editor.BaseKit$EndLineAction.actionPerformed whenever a popup
is open when the "End" key is pressed (and presumably the same for the Home
key).
In the normal case, the stack trace is as follows:
{noformat}
at org.netbeans.editor.BaseKit$EndLineAction.actionPerformed(BaseKit.java:3539)
at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347)
at
org.netbeans.spi.editor.AbstractEditorAction.actionPerformed(AbstractEditorAction.java:468)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
...standard AWT trace follows...
{noformat}
In the popup case, the stack trace is as follows:
{noformat}
at
javax.swing.text.DefaultEditorKit$EndAction.actionPerformed(DefaultEditorKit.java:2134)
at
org.netbeans.editor.PopupManager$PopupKeyListener.keyPressed(PopupManager.java:514)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:250)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6491)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
...standard AWT trace follows, same as in the non-popup case...
{noformat}
was (Author: ebakke):
Doing a bit of research on this, the problem seems to be that
javax.swing.text.DefaultEditorKit$EndAction.actionPerformed is called instead
of org.netbeans.editor.BaseKit$EndLineAction.actionPerformed whenever a popup
is open when the "End" key is pressed (and presumably the same for the Home
key).
In the normal case, the stack trace is as follows:
{noformat}
at org.netbeans.editor.BaseKit$EndLineAction.actionPerformed(BaseKit.java:3539)
at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347)
at
org.netbeans.spi.editor.AbstractEditorAction.actionPerformed(AbstractEditorAction.java:468)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
...standard AWT trace follows...
{noformat}
In the popup case, the stack trace is as follows:
{code:java}
at
javax.swing.text.DefaultEditorKit$EndAction.actionPerformed(DefaultEditorKit.java:2134)
at
org.netbeans.editor.PopupManager$PopupKeyListener.keyPressed(PopupManager.java:514)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:250)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6491)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
...standard AWT trace follows, same as in the non-popup case...
{code}
> Pressing Home/End scrolls to beginning/end of whole document if tooltip is
> open
> -------------------------------------------------------------------------------
>
> Key: NETBEANS-403
> URL: https://issues.apache.org/jira/browse/NETBEANS-403
> Project: NetBeans
> Issue Type: Bug
> Components: editor - Key bindings
> Affects Versions: 8.2, 9.0
> Reporter: Eirik Bakke
> Priority: Major
> Attachments: HomeEndBug.png
>
>
> When a tooltip is shown in the Java editor, for instance because the mouse is
> hovering over an error indication, pressing the Home or End keys on the
> keyboard scrolls the entire document all the way to the top or end,
> respectively instead of to the beginning or end of the current line. This is
> extremely disruptive, and likely very confusing to users, as it only happens
> in the stated situation.
> A workaround is to move the mouse pointer away from the editor to close the
> popup after examining an error. Most users will not be able to discover this
> workaround, though--for myself, it took two weeks to discover the correlation
> between the tooltip being open and the bug occurring.
> This bug seems to have been introduced in 8.2, and I justĀ confirmed that it
> is still present on the new Apache NetBeans 9.0 beta release.
> This issue was first reported as issue #270842 by timothyrheider in the old
> BugZilla tracker, on 2017-06-09:
> https://netbeans.org/bugzilla/show_bug.cgi?id=270842
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists