Bug 267807 - Ctrl-PageUp/Down broken in Nimbus
Ctrl-PageUp/Down broken in Nimbus
Status: REOPENED
Product: editor
Classification: Unclassified
Component: Key bindings
8.2
PC Linux
: P2 with 6 votes (vote)
: Dev
Assigned To: Svata Dedic
issues@editor
82patch-candidate
: L&F, REGRESSION
: 268168 (view as bug list)
Depends on:
Blocks: 258764
  Show dependency treegraph
 
Reported: 2016-08-31 15:03 UTC by Jesse Glick
Modified: 2016-12-14 12:39 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2016-08-31 15:03:58 UTC
In a dev build from today, Ctrl-PageUp and Ctrl-PageDown stopped working to cycle editor tabs. I added an alternative binding Ctrl-Alt-Left for “Previous Tab” and that does get honored.

Confirmed that this is a regression: works fine in a dev build from Nov 04. Makes IDE barely usable, since I use this keyboard shortcut constantly, and I do not want to remember a different one when (for example) Chrome also uses it to switch tabs.
Comment 1 Jesse Glick 2016-08-31 15:04:28 UTC
JDK 8u92, XFCE desktop.
Comment 2 Jiri Kovalsky 2016-08-31 15:27:58 UTC
Works fine in Product Version: NetBeans IDE Dev (Build 201608290002)
Java: 1.8.0_71; Java HotSpot(TM) 64-Bit Server VM 25.71-b15
Runtime: Java(TM) SE Runtime Environment 1.8.0_71-b15
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)

Linux Mint 17.1 with Cinnamon

Also works fine in yesterday's build from profiler-main on Windows 7.
Comment 3 AlexFalappa 2016-09-26 14:32:37 UTC
Just faced this issue.

I'm on Ubuntu Linux 16.04 with Unity desktop and GTK 3.18.9 (libgtk package exact version 3.18.9-1ubuntu3.1).

What I'm observing is Ctrl-PageUp/Down cause horizontal page scrolling: Ctrl+PageUp scrolls the editor a page right, Ctrl+PageUp scrolls the editor a page left.

Really annoying since I prefer using these keyboard shortcuts instead of Ctrl+Tab.

Product Version: NetBeans IDE 8.2 RC (Build 201609140952)
Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13
System: Linux version 4.4.0-38-generic running on amd64; UTF-8; it_IT (nb)
Comment 4 Jesse Glick 2016-09-28 14:20:24 UTC
Reproducible in a new build, but only when using `--laf Nimbus`.
Comment 5 Jesse Glick 2016-09-28 14:57:33 UTC
Bisecting using

ant clean build-nozip tryme -Dtryme.arg.nimbus='--laf Nimbus' -Dcluster.config=minimal -Dtryme.arg.nbopen='--open /tmp/one.txt /tmp/two.txt /tmp/three-with-long-lines.txt'

Confirmed AlexFalappa’s finding that the keys now perform horizontal scrolling in the editor, rather than being captured by the NB window system to switch tabs.
Comment 6 Jesse Glick 2016-09-28 16:02:44 UTC
You never know what you are going to find when you go looking!

The first bad revision is:
changeset:   306740:e7f3e410cbb8
branch:      debugger_pin_watch
parent:      305882:9a9b2f700549
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Mon Mar 21 16:35:53 2016 +0100
summary:     Prototype Pin Debug Watch
Comment 7 Jesse Glick 2016-09-28 16:21:53 UTC
Indeed the following hotfix seems to fix the issue (at what cost I am not sure):

diff --git a/editor/src/org/netbeans/modules/editor/NbEditorUI.java b/editor/src/org/netbeans/modules/editor/NbEditorUI.java
--- a/editor/src/org/netbeans/modules/editor/NbEditorUI.java
+++ b/editor/src/org/netbeans/modules/editor/NbEditorUI.java
@@ -256,7 +256,7 @@
 //        window.show();
 
         // Add the scroll-pane with the component to the center
-        JScrollPane scroller = new JScrollPane(layers);
+        JScrollPane scroller = new JScrollPane(/* TODO #267807 layers */component);
         scroller.getViewport().setMinimumSize(new Dimension(4,4));
 
         // remove default scroll-pane border, winsys will handle borders itself
Comment 8 Jesse Glick 2016-09-28 16:28:54 UTC
The problematic UI code appears to have been introduced as part of #258764.
Comment 9 AlexFalappa 2016-09-28 16:50:45 UTC
I confirm that I was using the Nimbus LAF too.

@Jesse Glick did you checked your hot fix doesn't break the pinned watch feature introduced in the issue you mention?
Comment 10 AlexFalappa 2016-09-29 07:52:46 UTC
Unfortunately the shortcuts do not work on the Darcula LAF too (just tested with Darcula LAF for NetBeans plugin version 1.5 available from http://plugins.netbeans.org/plugin/62424/darcula-laf-for-netbeans).

The observed behaviour is the same as with the Nimbus LAF: horizontal scrolling
Comment 11 RomkeVanderMeulen 2016-10-08 10:43:04 UTC
*** Bug 268168 has been marked as a duplicate of this bug. ***
Comment 12 Jesse Glick 2016-10-10 14:55:56 UTC
> did you checked your hot fix doesn't break the pinned watch feature

Probably it does break this new feature, whatever it is (I have never even tried to use it), whereas navigating between editor tabs is a fundamental task I do several times a minute. This is just a hotfix to make dev builds tolerable again, not a proposed patch.
Comment 13 markiewb 2016-10-19 22:01:07 UTC
@Jesse: See a proposed solution for the DarculaLaf at https://github.com/Revivius/nb-darcula/pull/128 . Perhaps the Nimbus issue is related too?
Comment 14 Svata Dedic 2016-11-04 16:05:11 UTC
Bad day; the addInputMapsWithoutCtrlPageUpAndCtrlPageDown is  already in effect in Nimbus L&F.

It seems that NB's NimbusLFCustoms causes premature JScrollPane initialization, which installs the UI and caches values for input maps - loading from the Swing defaults which contains ctrl-pagedown.

Should be fixed in jet-main#e424830aeb3f
Comment 15 Quality Engineering 2016-11-11 02:50:05 UTC
Integrated into 'main-silver', will be available in build *201611110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e424830aeb3f
User: Svata Dedic <sdedic@netbeans.org>
Log: #267807: recover tab navigation in Nimbus - scrollpane was initialized and its values populated from default
Comment 16 Jesse Glick 2016-11-12 15:22:51 UTC
Great, I will verify as soon as I have a moment.
Comment 17 Jesse Glick 2016-11-22 16:25:59 UTC
Working for me in 29830a54cf64, thanks!
Comment 18 Jesse Glick 2016-11-29 16:37:46 UTC
Hmm, I think this is not really fixed. Page Up/Down do work fine at first. But then at some point after using the IDE for a while, they stop working; the only workaround is to restart. I have not managed to identify the trigger condition.
Comment 19 Svata Dedic 2016-12-06 09:08:39 UTC
Is it worth to include in a patch (considering it is only a partial fix) ?
Comment 20 _ gtzabari 2016-12-06 14:24:24 UTC
I'm going to let Jesse answer that last question, but either way I would suggest reopening this issue.
Comment 21 Jesse Glick 2016-12-09 18:31:56 UTC
Hmm, in a new dev build this seems to be broken even immediately after startup, so the only workaround is to stop using Nimbus. But I am unable to reproduce in a fresh user directory.

I guess it makes sense to backport, seeing as it seems to fix the reproducible case at least. I am not sure I can spare the time right now to bisect my user directory looking for a reproduction case.
Comment 22 Svata Dedic 2016-12-09 20:58:06 UTC
OK, backported as 606211bc9192
Comment 23 Jiri Prox 2016-12-14 12:39:45 UTC
Unfortunately I does not work at windows at all -> reopening


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo