MATLAB Answers

Oversensitive horizontal scrolling in MATLAB on Mac

16 views (last 30 days)
Maxandre Jacqueline
Maxandre Jacqueline on 21 Jul 2018
Answered: bdcxns on 26 Jun 2019
Using the trackpad on the MacBook if I scroll up or down and release in the code editor, the window shifts to the right, cutting off the first few characters of every line. I can use the arrows to move to the beginning of the line again, but it is very frustrating when looking over code to have to keep adjusting the text view in the window. I don't have this issue in other programs that allow horizontal scrolling (as well as vertical).
My operating system is MacOS Sierra version 10.12.6, my computer is a MacBook Air (13-inch, Mid 2013), and I use MATLAB R2018a. Help would be appreciated!
  4 Comments
Thaddeus
Thaddeus on 16 Jan 2019
Same problem....it slowly drives you completely insane. Seems to happen primarily when editor is open on a second monitor (usb-c to DisplayPort cable; no dongles).
• Matlab 9.4.0.813654 (R2018a), MacBook Pro (2016), MacOS 10.13.6
Note: this is distinct from the old autoscroll problem that plagued Matlab installs a few versions ago, where the editor or command window would start scrolling up for an extended duration. The window scroll position just jumps 1 character to the right (and sometimes 1 char upward too) when you take your fingers off the trackpad after scrolling.
Whatever the underlying problem is, it seems related to the right click jumping error because when the scrolling thing is driving me nuts two-finger right clicking in the editor window (while maintaining contact with the trackpad) also reliably causes the scroll position to jump & the popup context menu to disappear.
Changing the way the user interacts with the computer (e.g. turn off two-finger click & scroll, use an external mouse, don't use a second monitor) are really absurd suggestions to what is clearly a software problem. ...This needs a proper patch from The Mathworks.

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 22 Aug 2018
The main discussion for this problem is in https://www.mathworks.com/matlabcentral/answers/370696-text-jump-on-right-click, which includes discussion of work-arounds
  1 Comment
Yolande Serra
Yolande Serra on 22 Oct 2018
This is actually a different problem. This discussion is related to scrolling through a code in the editor, not trying to right-click on text within the editor. (A problem I actually do not have.)

Sign in to comment.


bdcxns
bdcxns on 26 Jun 2019
For any one encountered this issue, I have found one cause and the solution.
The situation for me is: this issue does not occur to me before Matlab 2017b, so previously I have to switch back to 2017a to avoid it. But when I am installing the newer versions, I found that the window jumps back one line or two after I lift my finger from the trackpad after scrolling, even when I am selecting which product to choose ! So I think it is not related to Matlab itself (it has not been installed), but it is related to the JRE shipped with Matlab.
After installing the newest Java version, and use 'export MATLAB_JAVA='the system jre path' ' in the terminal to let Matlab use the system JRE instead of the one shipped with it, and start the matlab.app from the terminal (you can make it permanent so you don't need to run everything from terminal), this issue is GONE !
However, it is stated by Matlab that only the shipped JRE is fully supported and some libraries might not work properly using other JRE, but I think this 'window jumping back issue' is much more frustrating than 'library not supported'.
The cause of this problem in your case might be different from mine, but you can give it a try first. Hope Matlab can fix this bug in future.
I am running Mojave by the way.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!