Bug #67465 SQL Editor auto-scrolls to the top after executing a query
Submitted: 4 Nov 2012 4:06 Modified: 8 Nov 2013 9:35
Reporter: Fotis Kokkoras Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.0.7 OS:Windows (Microsoft Windows 7 Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[4 Nov 2012 4:06] Fotis Kokkoras
Description:
In an sql script with many queries, long enough so that the vertical scrollbar is visible, when I execute a query that is near the bottom of the code, the editor auto scrolls to the tops of the script.

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.44  revision 9933
Configuration Directory: C:\Users\Fotis\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench
Cairo Version: 1.8.8
OS: Microsoft Windows 7  Service Pack 1 (build 7601), 64-bit
CPU: 2x Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz, 4.0 GiB RAM
Active video adapter (0): NVIDIA GeForce GTX 260
Installed video RAM: 896 MB
Current video mode: 1680 x 1050 x 4294967296 colors
Used bit depth: 32
Driver version: 9.18.13.697
Installed display drivers: nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Current user language: Greek (Greece)

How to repeat:
1. Create a few queries so as the vertical scrollbar makes sense.
2. Scroll down to the last query (so as the thumb of the vertical scroll bar moves to the bottom of the scroll bar).
3. Execute the last query (using the button with the lightning and the garet from the editor's toolbar). The editor window auto scrolls to the top of the page makes you losing the code you had in sight.
[6 Nov 2012 13:54] MySQL Verification Team
Thank you for the bug report.
[25 Apr 2013 1:56] James Reed
I too have been suffering through this bug for the past few months.  It didn't used to do this.  It's extremely annoying when you have a page full of sql statements that you have to scroll down every time you execute a query.  I find I end up having to open a new query window and/or make sure my most recent queries are at the top of the window to work around this bug.
[7 Aug 2013 4:02] Kyle Quinn
FYI, this is also affecting me on OSX 10.8.4.
[19 Aug 2013 21:27] James Reed
This bug is a major usability issue and likely a trivial fix.  It makes it so you want to make sure your queries never require scrolling, because if they do, as soon as you execute the query you are jumped back to the top of the editor window and then have to manually scroll down and search for the query you just executed.

Please please please remove this jump to the top after every query execute.  This "jump" was introduced sometime last year and it worked great before that.
[19 Aug 2013 21:29] James Reed
BTW, I've confirmed this bug still exists in 6.x.
[19 Aug 2013 21:55] Fotis Kokkoras
I updated the Version info to 6.0.6
[13 Sep 2013 18:53] Peter Kniaz
Happens to me too, on Workbench 6.07, Windows 7.  Very annoying and potentially dangerous if you lose your place in the window and re-execute an update or insert that you didn't mean to do.
[4 Nov 2013 19:37] Alfredo Kojima
I'm unable to repeat this in Windows 7, could someone maybe record a short video of the bug happening?
[4 Nov 2013 19:53] Fotis Kokkoras
here is a recording of the bug

https://dl.dropboxusercontent.com/u/2690181/04-11-2013%2021-50-33.mp4
[4 Nov 2013 19:56] Fotis Kokkoras
It looks like there is a relation with the dissapearence of the results panel and the re-appearence of it with the results of the query just run. I can't think of anything better!
[4 Nov 2013 20:08] Peter Kniaz
I just uploaded a word document with before and after screen shots explaining what happens.  I'm in Windows 7, Workbench 6.07.11215
[4 Nov 2013 20:45] Alfredo Kojima
Thanks guys, I was able to repeat it this time.
[5 Nov 2013 17:26] Alfredo Kojima
Bug #70221 is a duplicate
[8 Nov 2013 9:35] Philip Olson
Fixed as of MySQL Workbench 6.0.8, and here's the changelog entry:

Scrolling down an SQL file and executing a statement ("Control" + "Enter")
would scroll the window back to the top. The cursor now remains, even when
the window is resized.

Thank you for the bug report.
[5 Dec 2013 21:35] Peter Kniaz
Just wanted to say thanks!  I've been using it ever since you put the fix in and it works great!
[9 Nov 2016 10:29] Aitor Roncal
It stills happens to me on Ubuntu 16.04 + Workbench 6.3.6 build 511 (64 bits).

It doesn't scroll to the top though, but a few lines upper. Very annoying.